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 upDoc: add a section for code exposed to both C++ and python #158
Comments
|
Are there any examples of doing this anywhere I could take a look at? |
|
You can find an example here. The idea is to put the code in dedicated headers and cpp files that can be compiled in C++ mode only, and to expose them to the python in a single cpp module file. |
|
I am a new xtensor-python user and I found the above example code is nice. However, most of them are related to It would be nice if more use cases could be included. For example, I want to modify an
However, on the Python side, I cannot see the change. If I change xt::pyarray to xt::xarray and run the function only in C++, it works. Could you please let me know how to make the Python binding work? Thank you! |
This appears to be a legitimate bug. Will be getting back to you shortly with a fix. |
This section should describe the best practices when functions need to be exposed to both C++ (operating on
xtensor / xarray) and Python (operating onpytensor / pyarray)