[Numpy-discussion] Updating cython directory to pxd usage: objections?

Andrew Straw strawman@astraw....
Fri Jun 20 13:11:32 CDT 2008


Fernando Perez wrote:
> I verified further by putting the import_array() back into  the .pyx
> file and indeed:
>
> - i_a() in .pxd -> missing from .c file.
> - i_a() in .pyx -> OK in .c file.
>
> It thus seems that  we must keep the import_array call out of the .pxd
> and users still need to remember to make it themselves.
>   
It's not the worst thing in the world, either -- sometimes one wants a
bit of the C structures layout from the .pxd file to use the array
interface without actually calling any of the numpy C API. Thus,
occasionally, calling import_array() would be a (probably very minor)
waste. However, this appears to be a completely moot point now...

-Andrew


More information about the Numpy-discussion mailing list