[Cython] Reevaluating buffer syntax
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Aug 6 02:32:07 CEST 2008
Dag Sverre Seljebotn wrote:
> - Follow Dan Gindikin and Pex: Make a new syntax in the Lexicon for
> integer literals followed by a "D", as meaning "dimensionality". So you
> need to do
>
> cdef ndarray[int, 2D]
I would be slightly worried that this could conflict with
some future syntax for decimal float literals.
Also, there would still be some tricky parsing issues,
since you have to get all the way up to the 2D (or at
least the comma) before you realise what's going on.
Another approach would be to use a different kind of
brackets, such as
cdef ndarray{int, 2D}
--
Greg
More information about the Cython-dev
mailing list