[C++-sig] Status of Numpy support in boost python

Pim Schellart p.schellart at gmail.com
Tue Mar 9 12:34:00 CET 2010


Hi Everyone,

wow! I am overwhelmed by the amount of response to this request.
I looked at the other options and must say I agree with Jim Bosch' comment:

> The whole point of using numpy with C++ is to be able to go
> from raw pointers to numpy arrays and back, and that doesn't seem to be
> possible with an interface that just calls the Python API (as the
> numeric interface does at present).

for fast numerical calculations callbacks into Python are not a good option.
In terms of the discussion concerning compiled or header only I think
that although it would be nice and clean to have a header only
library, as it stands boost python has to be compiled anyway and I
think adding numpy as an optional dependency would not be bad because
users who want to use this functionality by definition have numpy
installed as well.
I do think it would not be good to add it as a required dependency for
boost python since numpy is (not yet) part of the Python standard
library.

Since I am not a core numpy or boost developer and have little
experience working directly with the numpy C api any code
contributions from me would probably be ugly.
However I am keen to see numpy support in boost python as soon as
possible and would like to help on for instance testing or writing
documentation.
I could probably also help to add the numpy support to the cmake
builld system for boost.

Kind regards,

Pim Schellart


More information about the Cplusplus-sig mailing list