hi all,
I'm trying to understand how to use the deprecation mechanism.
1. When not defining NPY_NO_DEPRECATED_API, I get warnings (as expected):
#warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
2. When defining NPY_NO_DEPRECATED_API, as mentioned in the above
warning and in the documentation, I get this error:
#error Should never include npy_deprecated_api directly.
3. If instead I include <numpy/npy_no_deprecated_api.h>, I get no
warning at all, and the extension builds as expected.
Now, why does the second error occur, whereas I do not include
npy_deprecated_api.h, and most important, what is the correct way to use
the deprecation mechanism?
There seems to be a few issues related to this on github, most of them
closed, but reading them did not help me understanding.
The extension i'm trying to improve is aubio and can be found at
http://aubio.org. A copy of the relevant code is at:
https://github.com/piem/aubio/blob/develop/python/ext/aubio-types.h
thanks, piem
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion