Skip to content

Commit

Permalink
fix issue 3668 by removing bool casts in numpy.h (#3669)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylion007 authored Jan 31, 2022
1 parent 3a8d923 commit 978617f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/pybind11/numpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_)();
Expand Down

0 comments on commit 978617f

Please sign in to comment.