mirror of
https://github.com/pybind/pybind11.git
synced 2026-06-06 07:51:47 +00:00
pybind11: implicitly convert NumPy integer scalars
The current integer caster was unnecessarily strict and rejected various kinds of NumPy integer types when calling C++ functions expecting normal integers. This relaxes the current behavior.
This commit is contained in:
@@ -124,4 +124,6 @@ test_initializer numpy_array([](py::module &m) {
|
||||
return py::array_t<int>({2}, {4}, a.data, obj);
|
||||
}
|
||||
);
|
||||
|
||||
sm.def("function_taking_uint64", [](uint64_t){ });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user