[Pyrex] Numeric and Pyrex
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Sep 19 09:29:40 CEST 2005
Nitin Madnani wrote:
> I need to be able to create Numeric arrays inside my pyrex function and
> be able to return that created Numeric array as the result of my
> function.
The easiest way to create a Numeric array in Pyrex is
the same way you would do it in Python, i.e. by
calling its constructor, or one of the functions in the
Numeric module that constructs arrays.
If you declare the Numeric array type as an external
extension type, then once you've created it, you can
access its C internals to put data into it. One of the
demos that comes with Pyrex shows the declarations
you need.
Greg
More information about the Pyrex
mailing list