I've developed some boost::python code that allows conversion from numpy arrays to boost::multi_array_refs and from boost::multi_array(ref)s to numpy arrays without copying data. It does not deal with lifetime management but nevertheless I've found it very useful. I know pyublas performs a similar function including lifetime management but that is restricted to matrices and vectors. So if anyone is interested I'd be very happy to share it.

It does already handle both C and fortran ordered storage and I have in mind to extend it to deal with slices, strides, etc... but have not needed this yet.

John.

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to