Closed xiuliren closed 4 years ago
Maybe it would work if you assign the xtensor first to a pytensor or pyarray? Or if that's not enough, then you might be able to extract the underlying numpy array. Even though I think it should be enough as soon as you have a pytensor or pyarray.
thanks! you are right. transforming to pytensor works!
I am following the example of pybind11: https://pybind11.readthedocs.io/en/stable/advanced/classes.html#pickling-support
my code is like:
The Points is
xtensor<float, 2>
the
cast
toxtensor<float,2>
do not compile and get an error:It seems a cast error, any idea or example to fix it?