[Matrix-SIG] An area where the C-API for NumPy 1.12 is not 100% compatible
Travis Oliphant
Oliphant.Travis@mayo.edu
Wed, 1 Sep 1999 21:34:59 -0500 (CDT)
I just got bit by an area where NumPy 1.12 is not 100% compatible with
older versions when using it in C.
If you use the O! syntax in PyArg_ParseTuple to check for array object
arguments (by using &PyArray_Type as the extra argument) you will have
trouble with your extension module with the NumPy 1.12 release since the
object passed is now a subclass of the extension class.
I don't know of an easy fix other than using O& with a converter function
that uses PyArray_Check to check or going to the old
check-each-argument-manually approach.
If anyone knows of a better approach let me know.
Thanks
Travis