I'd like to return to Python the results of my computations in a ndarray object. I know there is a make_tuple
method so I figure there might be something similar for arrays though I can't find it.
Edit - I guess I can create the array in python, pass it as an extra parameter and modify it to hold the values. Would be better to use a return value though.
Try boost::python::numeric::array
: http://www.boost.org/doc/libs/1_46_1/libs/python/doc/v2/numeric.html#array-spec
Numeric is the former name of NumPy. It's possible that this wrapper still works with NumPy. Boost::Python seems to be notorious for having out of date documentation.
2ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobG1uZmmBc3vDqJysZZKkvLTAjKmwraCfo3qprdWeZJplnZa4pnnAq6masV2isrW0zp0%3D