Skip to content

Commit 978617f

Browse files
authored
fix issue 3668 by removing bool casts in numpy.h (#3669)
1 parent 3a8d923 commit 978617f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/pybind11/numpy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ struct npy_api {
170170
}
171171

172172
bool PyArray_Check_(PyObject *obj) const {
173-
return (bool) PyObject_TypeCheck(obj, PyArray_Type_);
173+
return PyObject_TypeCheck(obj, PyArray_Type_) != 0;
174174
}
175175
bool PyArrayDescr_Check_(PyObject *obj) const {
176-
return (bool) PyObject_TypeCheck(obj, PyArrayDescr_Type_);
176+
return PyObject_TypeCheck(obj, PyArrayDescr_Type_) != 0;
177177
}
178178

179179
unsigned int (*PyArray_GetNDArrayCFeatureVersion_)();

0 commit comments

Comments
 (0)