[Pyrex] Numeric and Pyrex
Nitin Madnani
nmadnani at wam.umd.edu
Mon Sep 19 16:39:27 CEST 2005
Hmm, I see. So I can call Numeric pythonically to create the array
and then use the external type code as demonstrated in your example
to fill it ? And I can do both of these things in the same pyrex module?
Did I get that right? Awesome !
Nitin
On Sep 19, 2005, at 3:29 AM, Greg Ewing wrote:
> 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