[Numpy-discussion] what's the difference between npy_intp and size_t?

Travis Oliphant oliphant.travis at ieee.org
Tue Sep 19 13:37:40 CDT 2006


Martin Wiechert wrote:
> Hi list,
>
> Please forgive my ignorance: Is there any difference between npy_intp and 
> size_t. Aren't both "ints just big enough to be safe with pointer arithmetics 
> even on 64 bit architectures?".
>   

size_t is unsigned
npy_intp is signed

It is basically the same as Py_ssize_t (which is not available until 
Python 2.5).  

-Travis





More information about the Numpy-discussion mailing list