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

Paul F. Dubois dubois at users.sourceforge.net
Mon Jan 8 19:38:29 EST 2001


The problem is that Numeric arrays do not have the equivalent of "append".
There is a function concatenate and you may find it easiest just to use the
C API of Python to execute this routine and capture the result.

Array is not documented because it is just there as an example, not a
completed work.
A frightening number of people have found it useful so it would be nice if
someone fleshed it out some.

Numeric's documentation is at numpy.sourceforge.net.

"Phlip" <phlip_cpp at my-deja.com> wrote in message
news:XHs66.282$ip2.91379 at news.pacbell.net...
> 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