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

Andrew Straw strawman at astraw.com
Fri Jun 20 14:11:32 EDT 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