8000 BUG: properly define PyArray_DescrCheck · numpy/numpy@7758dd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7758dd1

Browse files
mattipcharris
authored andcommitted
BUG: properly define PyArray_DescrCheck
1 parent 51826db commit 7758dd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/core/include/numpy/ndarrayobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C" {
2323

2424
/* C-API that requires previous API to be defined */
2525

26-
#define PyArray_DescrCheck(op) (((PyObject*)(op))->ob_type==&PyArrayDescr_Type)
26+
#define PyArray_DescrCheck(op) PyObject_TypeCheck(op, &PyArrayDescr_Type)
2727

2828
#define PyArray_Check(op) PyObject_TypeCheck(op, &PyArray_Type)
2929
#define PyArray_CheckExact(op) (((PyObject*)(op))->ob_type == &PyArray_Type)

0 commit comments

Comments
 (0)
0