[Numpy-discussion] Best way to expose std::vector to be used with numpy

Toby St Clere Smithe mail at tsmithe.net
Tue Oct 14 11:59:45 EDT 2014


John Zwinck <jzwinck at gmail.com> writes:
> Some time ago I needed to do something similar.  I fused the NumPy C
> API and Boost.Python with a small bit of code which I then
> open-sourced as part of a slightly larger library.  The most relevant
> part for you is here:
> https://github.com/jzwinck/pccl/blob/master/NumPyArray.hpp

There is also a 'Boost.NumPy', which is quite nice, though perhaps a bit
heavy-duty:

https://github.com/ndarray/Boost.NumPy/

Cheers,


Toby




More information about the NumPy-Discussion mailing list