Support NumPy 1.7 C API
Opened this issue · 3 comments
Building Boost.NumPy against current NumPy versions results in deprecation warnings, as it depends on an outdated API.
It would be great to migrate to the new NumPy API.
NumPy 1.7 C API wraps up everything, deprecates direct access.
Right. We'll have to do more than just eliminate the warnings here to be safe for future NumPy versions, as I don't believe there are deprecation warnings on direct access, even though it has also been deprecated.
So this is actually a duplicate of #8, but I think I'll close that one and keep this one open, as it contains a better description of the issue (I opened #8 before it was clear exactly what NumPy 1.7 was going to do to the API, or at least before I knew enough about it).
That said, I'm not in a huge rush to do this, as I think it's important to support the old API for quite a while yet, and supporting both APIs just means that we'd have to duplicate here all the #define-based infrastructure that's already in NumPy itself in order to support both. It's clearly worth doing eventually, and I'll gladly accept patches or pull requests that move us in that direction, but I may not get to it myself for a while yet.
Looks like all we're using from the deprecated API are the old versions of the various NPY_*
(now NPY_ARRAY_*
) defines that were perhaps gratuitously changed in numpy 1.7. Updating that is trivial, but will break support for NumPy versions < 1.7. If anyone paying close attention would be hurt by that, speak now or forever hold your peace: I could also just disable the warnings without moving to the new API, but that just punts the problem down the road.