CXX/Array.h's Py::Array samples or documentation?

Phlip phlip_cpp at my-deja.com
Mon Jan 8 19:11:13 EST 2001


Pythonesqueise:

I want to pass a NumPy multiarray into a C++ function (incidentally 
bound by SWIG), and wrap it with the CXX module's Py::Array class.

Then I want to increase the volume of this multiarray, fill it full of 
data, and pass it back up. Client code in Pythonland will then ufunc the 
data and do other terrible things to it.

I can't figure out how to extend the array. It does not seem to have a 
"push" feature.

So I think I can allocate a new array of the correct dimensions; pack it, 
and assign it into the target array. But the example code for Py::Array 
only shows how to create it with one dimension.

E-searching for "cxx" and "array" returns many, many interesting pages that 
will distract me learning new things about completely unrelated projects. 
The CXX documentation was wrought before Array.h was added.

Is there any example code or documentation I'm missing for Py::Array? Or 
multiarray?

-- 
Phlip
http://c2.com/cgi/wiki?PhlIp



More information about the Python-list mailing list