[Numpy-discussion] numpy, Py_ssize_t, cython and 64 bits python 2.4

David Cournapeau cournape at gmail.com
Sun Nov 9 13:44:30 EST 2008


On Mon, Nov 10, 2008 at 2:40 AM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
>
>
> Let me see if I understand this correctly. For Python < 2.5 the list indices
> and such are ints, while for later versions they are Py_ssize_t, which is
> larger on 64 bit systems. Meanwhile, Py_intptr_t is large enough to hold a
> pointer.

yes

> So why are these two numbers being mixed?

It is note that they are being mixed, but that cython does not support
this configuration: it has a internal check which raise an exception
in such a case. See around line 55:

http://hg.cython.org/cython/file/764f1578df40/Cython/Includes/numpy.pxd

As I understand, this means you can't use cython for such a
configuration, but I just wanted to confirm whether there were known
workarounds.

cheers,

David



More information about the NumPy-Discussion mailing list