Issue description
It looks like all numpy types are autoconverted to C++-level int/double/etc. as needed, with the exception of np.bool_. I'd think np.bool_ should likewise get autoconverted to a C++ bool.
Reproducible example code
Compiling the example repository pybind11/python_example with the following patch applied:
diff --git a/src/main.cpp b/src/main.cpp
index d81046d..8adbe25 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,6 @@
#include <pybind11/pybind11.h>
-int add(int i, int j) {
+int add(int i, bool j) {
return i + j;
}
Then
python_example.add(np.int64(1), True)
works, but
python_example.add(1, np.bool_(True))
fails with a TypeError.
(initially reported on gitter)