[Cython] NumPy 1.7+ warnings

2014-06-25 Thread Stefan Behnel
Hi, recent NumPy versions are a bit unhappy about Cython code and generate deprecation warnings about it: .../numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" I don't know

Re: [Cython] NumPy 1.7+ warnings

2014-06-25 Thread Frédéric Bastien
Just to help people working on this, here is what I added in Theano: # numpy 1.7 deprecated the following macro but the new one didn't # existed in the past if bool(numpy_ver < [1, 7]): cxxflags.append("-D NPY_ARRAY_ENSUREARRAY=NPY_ENSUREARRAY") cxxf