[Biopython-dev] NumPy 1.7 and NPY_NO_DEPRECATED_API warnings

Peter Cock p.j.a.cock at googlemail.com
Mon Sep 23 20:58:25 UTC 2013


Hi all,

I'm seeing the following warning from NumPy 1.7 with Python 3.3 on Mac
OS X, and on Linux too. I believe the NumPy version is the critical
factor:

building 'Bio.Cluster.cluster' extension
building 'Bio.KDTree._CKDTree' extension
building 'Bio.Motif._pwm' extension
building 'Bio.motifs._pwm' extension

all give:

/Users/peterjc/lib/python3.3/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: "Using
      deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

According to this page,
http://docs.scipy.org/doc/numpy-dev/reference/c-api.deprecations.html

If we add this line it should confirm our code is clean for NumPy 1.7
(and implies to side effects on older NumPy):

#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

Unfortunately that seems all four modules have problems doing
that, presumably planned NumPy C API changes we need to
handle via a version conditional #ifdef?

Peter



More information about the Biopython-dev mailing list