I am creating a C++ project which includes some python. I have used boost::python but now I am stuck. I have some data stored in a std::vector. The data should be send to python to do some calculations. The Python NumPy functions I use need the data in ndarray format, so I need a way to convert it. Since I want to do some more things with the results in C++ I want to convert the result back from ndarray to std::vector.
How can I convert std::vector to ndarray and vice versa? Can anyone post some sample code?
I know there is a lib called boost.numpy out there, but are there other ways, because I was not able to build this lib...
Can I use boost::python::numeric for the job? Can anyone provide sample code?
Is it possible without copying data?