Accessing 2D array from python in C++

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Accessing 2D array from python in C++

alfa
This post has NOT been accepted by the mailing list yet.
I have tried to access/expose 2D array from python in C++ using boost::multi_array. Nevertheless, it seems that the boost::multi_array<double, 2> datatype is not supported. Is there any way to resolve this? My way of accessing it as below:

            boost::python::object Vp = main_namespace["Vp"];
            Vp_cpp = boost::python::extract<boost::multi_array<double, 2> >(Vp);

Thanks in advance.
Loading...