[Cython] Supporting new and old NumPy C API

Frédéric Bastien nouiz at nouiz.org
Tue Nov 5 18:08:25 CET 2013


Hi,

As you probably know, cython generated c code use the old NumPy C API,
so when we compile them with newer version of NumPy this generate
warnings.

In Theano we compile many different module during the user script. So
this cause many warning being printed to the users, so we updated
Theano to work with newer and older NumPy without warning.

As we disable the old NumPy C API, we are not able to compile the
cython generated code. So I manually updated the cython code to work
with the new and old api.

I did a post on the numpy mailing list that explain how I did this, in
case someone want to tackle this problem in Cython:
http://mail.scipy.org/pipermail/numpy-discussion/2013-November/068209.html

Frédéric Bastien


More information about the cython-devel mailing list