[Numpy-discussion] libnumarray.h and NO_IMPORT_ARRAY

Philip Austin paustin at eos.ubc.ca
Tue Oct 8 07:34:03 EDT 2002

We're currently porting several of our boost-wrapped Numeric classes
to numarray.  The routines are spread across several cpp files, and
**libnumarray_API is needed in each file.  In Numeric, we invoke
import_array() in the module file, to initialize **PyArray_API, and
def NO_IMPORT_ARRAY in the other files; this produces 
extern void **PyArray_API in those files, and everyone's happy.

Currently libnumarray.h doesn't implement this -- is there
another way to compile a multiple file project which
initializes the API just once?

Thanks, Phil Austin

More information about the NumPy-Discussion mailing list