[Matrix-SIG] An area where the C-API for NumPy 1.12 is not 100% compatible

Konrad Hinsen hinsen@cnrs-orleans.fr
Fri, 3 Sep 1999 16:03:18 +0200


> 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'd prefer a fix in NumPy, if possible. Without looking at any code
at all, could one rename the type of the "fundamental" array object
to something else and use PyArray_Type for the subclass? Assuming
of course that subclasses have proper type objects.

> 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.

I wouldn't want to do either to my code, I have tons of such checks...

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------