← 返回首页
problem calculating quantile on pytensor · Issue #286 · xtensor-stack/xtensor-python · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

problem calculating quantile on pytensor #286

New issue
New issue

Description

Hi,

The new added xt::quantile seems not to play nicely with pytensor.

For me, the following :

xt::pytensor<double, 2> arr {{ 5.3, 4.3, 5.3 }, { 4.2, 4.2, 5.2 }, { 5.7, 4.7, 5.7 }, { 2.3, 4.3, 2.3 }}; auto q = xt::quantile(arr, {0.3, 0.7}, 1);

raises :

~/xtensor/include/xtensor/xsort.hpp:463:31: error: non-constant-expression cannot be narrowed from type 'xt::xcontainer<xt::pytensor<double, 2, xt::layout_type::dynamic>>::size_type' (aka 'unsigned long') to 'long' in initializer list [-Wc++11-narrowing]
R ev = R::from_shape({de.size()});

I am using xtl==0.7.5, xtensor==0.24.4, xtensor-python==0.26.1, pybind11==2.10.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    • Open in GitHub Copilot app

    Footer

    © 2026 GitHub, Inc.