[Numpy-discussion] 20.1.0 undefined symbol: PyArray_API

Mike Romberg romberg at fsl.noaa.gov
Fri Jul 20 17:02:20 CDT 2001


  I have written a python module in C which is implemented as a
loadable shared library.  My module uses Numeric array objects and
includes arrayobject.h.  With Numeric-19 this used to work fine.  Now
my module will not load because the symbol PyArray_API is not found.

  I located this fellow in the arrayobject header file:

/* C API address pointer */
#if defined(NO_IMPORT) || defined(NO_IMPORT_UFUNC)
extern void **PyUFunc_API;
#else
#if defined(PY_UFUNC_UNIQUE_SYMBOL)
void **PyUFunc_API;
#else         
static void **PyUFunc_API;
#endif

  So, it seems (at first glance) that this symbol is either static or
extern based on the NO_IMPORT macro.  My question is, can I just
define NO_IMPORT before including arrayobject.h or does Numeric python
need to be rebuilt so that this symbol gets exported?

Thanks,

Mike Romberg (romberg at fsl.noaa.gov)




More information about the Numpy-discussion mailing list