Thank you very much for these additional details, Dag! They were
exactly what I needed.

Many thanks to all of you for your inspiring work on Cython, and happy new year!

Zak


On Mon, Dec 28, 2009 at 4:23 AM, Dag Sverre Seljebotn
<[email protected]> wrote:
>> 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
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to