[Numpy-discussion] Re: STL wrapper for PyArrayObject

phlip phlip_cpp at my-deja.com
Sat Jan 6 00:10:52 CST 2001

On Friday 05 January 2001 06:24, pfenn at mmm.com wrote:

> Be sure to look at the CXX on sourceforge.

Ja. This is a sweet combination. The Joy of Swig is we can declare some 
parameters as basic types, but others as raw PyObjects. Then we can have our 
way with these.

And using CXX, we wrap these objects in high-level C++ methods. Not the 
low-level fragile C. The effect compares favorably to ATL for VC++ and 

But there's just one little question here. (Hence the buckshot of list 

If we pass a multiarray into a function expecting a PyArrayObject, how then 
do we add new elements to it? I tried things like 'push_back()' and 
'setItem()', but they either did not exist or did not extend the array.

Am I going to have to generate a new array and copy the old one into the new?


More information about the Numpy-discussion mailing list