I ran into the problem described here ( What is the import_umath function? ) And wanted to know if there is a fix for this? I have the same case where a Cython code is compiled that uses numpy with the following code:
import numpy as np cimport numpy as np np.import_array()
generates many _import_umath that are not used:
/usr/local/lib/python2.7/dist-packages/numpy-1.6.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/__ufunc_api.h:226:1: warning: '_import_umath' defined but not used [-Wunused-function]
removing np.import_array() does not change the result. As one of the posters suggested in the above thread, I tried adding this to my .pxd/.pyx :
cdef extern from *: import_umath()
it didn't matter either. How can I eliminate these warnings?
source share