Passing a numpy pointer (dtype=np.bool) to C++
问题 I'd like to use a numpy array of type bool in C++ by passing its pointer via Cython. I already know how to do it with other datatypes like uint8. Doing it the same way with boolean it does not work. I am able to compile but there is the following Exception during runtime: Traceback (most recent call last): File "test.py", line 15, in <module> c = r.count(b, 4) File "rect.pyx", line 41, in rect.PyRectangle.count (rect.cpp:1865) def count(self, np.ndarray[bool, ndim=1, mode="c"] array not None,