Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBinding array of arrays #24
Open
Labels
Comments
|
Sorry for the late response; at first sight, it seems the problem is on |
|
I think with the recently merged support for pybind11 dtypes we're closer to solving this one. However, I think we do not yet have specializations for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm attempting to bind a
xt::pyarray<xt::pyarray<double>>to a Numpy array of arrays, but I am getting compilation errors instantiating thepyarray. The error is a bit long to include here, the relevant bit iscoming from the call to
pybind11::dtype::of<T>in the return ofpyarray::raw_array_t. Unfortunately, I don't know enough about the inner workings ofpybind11to determine if the problem lies there, or whether this is axtensor-pythonissue.The problem I am trying to solve is to provide Python bindings to a code that uses
xtensorxarray. Usingxt::xarray<xt::xarray<double>>in a C++-only situation works as expected. Actually, my case is limited in that I always have three inner arrays, so in C++ I would prefer to usestd::array<xt::xarray<double>, 3>(or perhapsxt::xtensor<xt::xarray<double>, 3>) but I do not know how to transparently (without copies) expose those as an ndarray of three ndarrays to Python.Example code that produces the compilation error: