We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cc635b3 + 2943d07 commit 41dd751Copy full SHA for 41dd751
1 file changed
numpy/_core/include/numpy/ndarrayobject.h
@@ -32,7 +32,7 @@ extern "C" {
32
#define PyArray_DescrCheck(op) PyObject_TypeCheck(op, &PyArrayDescr_Type)
33
34
#define PyArray_Check(op) PyObject_TypeCheck(op, &PyArray_Type)
35
-#define PyArray_CheckExact(op) (((PyObject*)(op))->ob_type == &PyArray_Type)
+#define PyArray_CheckExact(op) (Py_TYPE((PyObject*)(op)) == &PyArray_Type)
36
37
#define PyArray_HasArrayInterfaceType(op, type, context, out) \
38
((((out)=PyArray_FromStructInterface(op)) != Py_NotImplemented) || \
0 commit comments