[Cython] Cython array type: Summary, introducing CEP 518
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Fri Jun 19 12:21:42 CEST 2009
Corrections, corrections...
Dag Sverre Seljebotn wrote:
> Then, some options:
>
> OPTION A:
> int[::stridespec,::stridespec]
> int[0::stridespec,::stridespec] -- default stridespec, but do not
> wraparound on first dim
Forget "default stridespec" part of that sentence.
> Default stridespec possible.
>
> OPTION B:
> SomeWord[int, ::stridespec, ::stridespec]
> SomeWord[int, 0::stridespec, ::stridespec]
>
> Default stridespec possible. Looks odd to me with the type on the "first
> dimension".
>
> OPTION C:
> SomeWord[int, (stridespec, stridespec)]
> SomeWord[int, (stridespec, stridespec), (False, True)]
>
> Default stridespec not possible (unless perhaps on all strides at the
> same time: SomeWord[int])
No, you still need to know number of dimensions, so default stridespec
not possible with this option. But "ndim=3" could be shorthand for
(defaultstridespec, )*3.
--
Dag Sverre
More information about the Cython-dev
mailing list