> Thanks for the quick reply. Could you say just a little more about how
> to work around this issue? The numpy.pxd file is close to 1000 lines
> long, and I don't know enough about Cython or NumPy to dive in and do
> a hot-fix.

You simply do

cdef ndarray[int] myarray = np.zeros((100,), dtype=np.intc)

"int" on the left is compile-time context and refers to c int, while
np.intc on the right side is a run-time object (where numpy.pxd doesn't
really come into play).

What you need to fix NumPy pxd for is so that you can type the completely
equivalent

cdef ndarray[np.intc_t] myarray = np.zeros((100,), dtype=np.intc)

Dag

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to