[C++-sig] Re: ANN: Boost.Python v2

David Abrahams dave at boost-consulting.com
Wed Oct 23 23:41:30 CEST 2002


Joe Van Andel <vanandel at atd.ucar.edu> writes:

> Thanks for your quick response.

No problem.

> > http://www.boost.org/libs/python/doc/v2/numeric.html
> 
> 
> Sorry, I guess I missed this.  You do reference Numeric in the
> reference manual, but I didn't see any reference in the Synopsis or
> the Tutorial Introduction.  Would you be willing to mention Numeric
> support in the Synopsis?

Sure. Tell me what you think it should say.

> Do you have any more examples of accessing Numeric arrays using Boost?

http://www.boost.org/libs/python/test/numpy.cpp
http://www.boost.org/libs/python/test/numpy.py

> >>That is, I want to pass Numeric Python arrays to my C++ extensions,
> >>and not have to write my C++ code to be aware of the Numeric
> >>interfaces (if possible).
> > I'm not sure what you mean by "not aware of the Numeric interfaces".
> 
> Sorry, I meant to say the Numeric API, e.g. calls like:
> PyArray_ISCONTIGUOUS()
> or
> PyArray_As2D((PyObject **)&theInput, (char ***)&inP,
>                   &numRays, &numGates,  PyArray_FLOAT);

I don't know if the above meets your needs. The numeric support could
use some fleshing-out, as others have pointed out on this
list. Patches to enhance the existing numeric support would be
gratefully considered.

HTH,
-- 
                    David Abrahams
dave at boost-consulting.com * http://www.boost-consulting.com

Building C/C++ Extensions for Python: Dec 9-11, Austin, TX
http://www.enthought.com/training/building_extensions.html





More information about the Cplusplus-sig mailing list