[Cython] Buffer syntax/array primitive type
Sturla Molden
sturla at molden.no
Mon Mar 9 13:01:58 CET 2009
On 3/8/2009 12:06 AM, Robert Bradshaw wrote:
> Very interesting, and I like the syntax for the most part (int
> [:,:,"fortran"] seems a bit odd to me, perhaps mode should be a
> keyword).
I wonder if you would consider
cdef int[::,:] arr
to indicate that a dimension might have strides in the first dimension
different from 1. And similar
cdef int[:,::] arr
cdef int[::,::] arr
That would allow you to ignore strides and speed up indexing for most
arrays. The most common case is unit strides.
S.M.
More information about the Cython-dev
mailing list