Re: [Cython] N-d arrays, without a Python object

2012-05-20 Thread mark florisson
On 20 May 2012 21:59, Pauli Virtanen wrote: > Hi, > > >        # OK, but slow >        cdef double[:,:] a = np.zeros((10, 10), float) > >        # OK, fast (no Python object) >        cdef double[10] a > >        # OK, but slow, makes Python calls (-> cython.view array) >        cdef double[10*10]

[Cython] N-d arrays, without a Python object

2012-05-20 Thread Pauli Virtanen
Hi, # OK, but slow cdef double[:,:] a = np.zeros((10, 10), float) # OK, fast (no Python object) cdef double[10] a # OK, but slow, makes Python calls (-> cython.view array) cdef double[10*10] a_ cdef double[:,:] a = (a_) # not allo