Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for xtensor_fixed #163

Open
@PerretB

Description

@PerretB

Hi,

currently xtensor python brings seamless integration ofxarray andxtensor types with numpy. Howeverxtensor_fixed type is not supported. Hence the following definitions work (withm an instance ofpybind11::module):

m.def("test_xarray", [](){return xt::xarray<int>{1,2};});m.def("test_xtensor", [](){return xt::xtensor<int, 1>{1,2};});

while this one fails

m.def("test_xtensor_fixed", [](){return xt::xtensor_fixed <int, xt::xshape<2>>{1,2};});

at runtime. When trying to call the method from python, the following error is reported:

TypeError: Unable to convert function return value to a Python type! The signature was() -> xt::xfixed_container<int, xt::fixed_shape<2ul>, (xt::layout_type)1, xt::xtensor_expression_tag>

Would it be possible to add seamless integration withxtensor_fixed ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp