diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-10-07 11:53:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-07 11:53:16 +0300 |
commit | b8445583d506aeb9da3897801132279e977b4427 (patch) | |
tree | 103f58ab2a4e839c364ce40e424f7294f69982d1 | |
parent | a8c730bc17ad3479dfba844bd860d85547b0e712 (diff) | |
parent | 6108b5d1e138d07e3c9f2a4e3b1933749ad0e698 (diff) | |
download | numpy-b8445583d506aeb9da3897801132279e977b4427.tar.gz |
Merge pull request #14605 from mattip/descr-check
BUG: properly define PyArray_DescrCheck{,Exact}
-rw-r--r-- | numpy/core/include/numpy/ndarrayobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/include/numpy/ndarrayobject.h b/numpy/core/include/numpy/ndarrayobject.h index 2cc7ced35..95e9cb060 100644 --- a/numpy/core/include/numpy/ndarrayobject.h +++ b/numpy/core/include/numpy/ndarrayobject.h @@ -23,7 +23,7 @@ extern "C" { /* C-API that requires previous API to be defined */ -#define PyArray_DescrCheck(op) (((PyObject*)(op))->ob_type==&PyArrayDescr_Type) +#define PyArray_DescrCheck(op) PyObject_TypeCheck(op, &PyArrayDescr_Type) #define PyArray_Check(op) PyObject_TypeCheck(op, &PyArray_Type) #define PyArray_CheckExact(op) (((PyObject*)(op))->ob_type == &PyArray_Type) |