[Numpy-discussion] [SciPy-user] Managing Python with NumPy and many external libraries on multiple Windows machines

Stéfan van der Walt stefan@sun.ac...
Tue Apr 28 15:26:25 CDT 2009

2009/4/28 Charles R Harris <charlesr.harris@gmail.com>:
> It is needed when the extension is loaded, that is why the very first
> function in the API returns it. Otherwise it is impossible to check if
> extensions compiled against one version of numpy can be loaded when another
> version of numpy is present. You need to know what API numpy presents and
> that can be different than the API the extension was compiled against.

Right, I phrased myself incorrectly.  NPY_VERSION is checked at
runtime to make sure modules compiled against a different ABI are not
imported.  These defines used to be closer to the top of the header
file, but now a lot of other stuff has been added.  Maybe it would be
good to include this as a separate header file, npy_version.h or

IIRC, we can expose NPY_FEATURE_VERSION as part of the API without
breaking ABI compatibility, as long as we add it at the end of the API
functions list.  As a hack, we can then check the length of the API
functions list to make sure it is available before we call it.


More information about the Numpy-discussion mailing list