[C++-sig] create boost array from a Numpy PyArray without copying data?

Ravi lists_ravi at lavabit.com
Mon Jan 19 16:21:02 CET 2009

On Monday 19 January 2009 07:16:10 Sebastian Walter wrote:
> My question is:
> How can I create a
> boost::python::numeric::array from a Numpy Pyarray without copying data?

See http://mail.python.org/pipermail/cplusplus-sig/2008-October/013825.html 
for a full solution. In particular, see the following class:

template <typename T> struct ublas_vector_from_numpy


More information about the Cplusplus-sig mailing list