I am converting a Cython memoryview to a numpy array (to be able to use it in pure Python code):
from libc.stdlib cimport realloc
cimport numpy as np
DTYPE
Just for a further reference, cython online docs says this is because Cython is using a deprecated Numpy API, and for the time being, it's just a warning that we can ignore.
I also get the same warnings, and I'd say it's normal.
With the numpy C API you need to put a line in front of the C script if you don't like this warning, but all it does is tell the compiler to ignore the "deprecated" message - it seems to work the same either way.
I'm guessing the Cython compiler doesn't put this line of code when it generates the C code, and I don't think that's important.
Assuming one wishes to hide the deprecation warning, the following compiler flag can be implemented with clang: extra_compile_args=['-Wno-#warnings']
.
For gcc, extra_compile_args=['-Wno-cpp']
achieves the same.
Of course this also hides other preprocessor directive warnings.