- Notifications
You must be signed in to change notification settings - Fork63
Open
Labels
Description
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
?