fix issue 3668 by removing bool casts in numpy.h (#3669)

This commit is contained in:
Aaron Gokaslan
2022-01-31 12:57:32 -05:00
committed by GitHub
parent 3a8d92308d
commit 978617f6b5

View File

@@ -170,10 +170,10 @@ struct npy_api {
}
bool PyArray_Check_(PyObject *obj) const {
return (bool) PyObject_TypeCheck(obj, PyArray_Type_);
return PyObject_TypeCheck(obj, PyArray_Type_) != 0;
}
bool PyArrayDescr_Check_(PyObject *obj) const {
return (bool) PyObject_TypeCheck(obj, PyArrayDescr_Type_);
return PyObject_TypeCheck(obj, PyArrayDescr_Type_) != 0;
}
unsigned int (*PyArray_GetNDArrayCFeatureVersion_)();