Fix for the NumPy C-API deprecation mechanism.

See issue #3008