Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Tom Denniston
I think the square brackets are very confusing as a numpy user not familiar with CPython. On 8/6/08, Christopher Barker <[EMAIL PROTECTED]> wrote: > Dag Sverre Seljebotn wrote: > > cdef numpy.ndarray[numpy.int64, ndim=2] > > +1 it's very clear what this means. I think the keyword should be require

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Christopher Barker
Dag Sverre Seljebotn wrote: > cdef numpy.ndarray[numpy.int64, ndim=2] +1 it's very clear what this means. I think the keyword should be required. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way N

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn wrote: > Travis E. Oliphant wrote: >> Gael Varoquaux wrote: >>> On Wed, Aug 06, 2008 at 10:35:06AM +0200, Dag Sverre Seljebotn wrote: >>> Stéfan van der Walt wrote: > 2008/8/6 Dag Sverre Seljebotn <[EMAIL PROTECTED]>: > >> - Require an ndim

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Dag Sverre Seljebotn
Travis E. Oliphant wrote: > Gael Varoquaux wrote: >> On Wed, Aug 06, 2008 at 10:35:06AM +0200, Dag Sverre Seljebotn wrote: >> >>> Stéfan van der Walt wrote: >>> 2008/8/6 Dag Sverre Seljebotn <[EMAIL PROTECTED]>: > - Require an ndim keyword: > >> > cd

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Travis E. Oliphant
Gael Varoquaux wrote: > On Wed, Aug 06, 2008 at 10:35:06AM +0200, Dag Sverre Seljebotn wrote: > >> Stéfan van der Walt wrote: >> >>> 2008/8/6 Dag Sverre Seljebotn <[EMAIL PROTECTED]>: >>> - Require an ndim keyword: > > cdef numpy.ndarray[numpy.int64, ndim=2

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Gael Varoquaux
On Wed, Aug 06, 2008 at 10:35:06AM +0200, Dag Sverre Seljebotn wrote: > Stéfan van der Walt wrote: > > 2008/8/6 Dag Sverre Seljebotn <[EMAIL PROTECTED]>: > >> - Require an ndim keyword: > >> cdef numpy.ndarray[numpy.int64, ndim=2] > > I'd definitely prefer a comma between the two, and an (optiona

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Stéfan van der Walt
2008/8/6 Dag Sverre Seljebotn <[EMAIL PROTECTED]>: >>> cdef numpy.ndarray[numpy.int64, ndim=2] >> >> I'd definitely prefer a comma between the two, and an (optional) ndim >> keyword argument if possible. > > I'm taking this as a vote in favor of this and against "2D" and <>? > > The keyword is alre

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Dag Sverre Seljebotn
Stéfan van der Walt wrote: > 2008/8/6 Dag Sverre Seljebotn <[EMAIL PROTECTED]>: >> - Require an ndim keyword: >> >> cdef numpy.ndarray[numpy.int64, ndim=2] > > I'd definitely prefer a comma between the two, and an (optional) ndim > keyword argument if possible. I'm taking this as a vote in favor

Re: [Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Stéfan van der Walt
2008/8/6 Dag Sverre Seljebotn <[EMAIL PROTECTED]>: > - Require an ndim keyword: > > cdef numpy.ndarray[numpy.int64, ndim=2] I'd definitely prefer a comma between the two, and an (optional) ndim keyword argument if possible. Looking forward to hearing more! Regards Stéfan

[Numpy-discussion] Cython/NumPy syntax

2008-08-06 Thread Dag Sverre Seljebotn
I'd like input from anyone interested in the following syntax questions. The current experimental Cython syntax for efficient ndarray indexing looks like this: cdef numpy.ndarray[numpy.int64, 2] arr Issue 1: One can argue that "2" above looks like a length specifier to newcomers. Issue 2: Thi