[SciPy-user] [Numpy-discussion] Re: segfault when calling PyArray_DescrFromType

Travis Oliphant oliphant.travis at ieee.org
Thu Feb 9 09:48:06 CST 2006

Martin Wiechert wrote:

>Found it (in the "old" docs).
>Must #define PY_ARRAY_UNIQUE_SYMBOL and call import_array ().

To be clear, you must call import_array() in the modules init function.  
This is the only requirement.

You only have to define PY_ARRAY_UNIQUE_SYMBOL if your extension module 
uses more than one file.  In the files without the module initialization 
code you also have to define NO_IMPORT_ARRAY.


More information about the SciPy-user mailing list