Nathaniel Smith <n...@pobox.com> wrote:

> Numpy internally does all index/stride calculations in units of bytes,
> though, so if accessing the data array directly and using strides, the only
> reliable approach is to use intp or equivalent.

If we use PyArray_STRIDES we should use npy_intp, yes, because we are
computing the address directly from a char*. It depends on how much we know
about the array in advance.

Also a C standard pendant would point out we can only assume an int will be
at least 16 bit, and we should use long to make sure it is at least 32 bit.

Sturla

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to