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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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_)();