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.

In particular, can I get around this without patching numpy.pxd? I've
noticed that np.long_t seems to map correctly to the underlying C long
type -- would it be simplest to create NumPy arrays with dtype np.long
for the moment and adjust my C code to expect long integers?

Thanks again,
Zak


On Sun, Dec 27, 2009 at 10:36 AM, Dag Sverre Seljebotn
<[email protected]> wrote:
>> Hello everyone,
>>
>> A very simple novice question: how can I determine the NumPy type that
>> Cython will agree to map to, say, the ordinary int type in C? I'm
>> wrapping a C function that accepts an int * argument, and I'm looking
>> for the appropriate NumPy type for a ctypedef statement. When I make
>> the obvious guesses, I see the same error message that someone else
>> describes here:
>
> Use numpy.intc for that purpose.
>
> However there's no numpy.intc_t in numpy.pxd in Cython, this is a bug,
> patch welcome (but it would just be a typedef for "int").
>
> I also believe numpy.double maps "more directly" to double float than
> numpy.float64.
>
> Dag Sverre
>
> _______________________________________________
> 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