numpy/numpy — pull request #5281 by rgommers (2014-11-16 16:08:10+00:00)
Title: MAINT: change place where NPY_NO_DEPRECATED_API is defined in f2py.

This makes sure to undef at the end (as suggested in gh-5270 by @charris), and by putting the define in the C code ensures that the error message is understandable.