Hello,
In my question for optimization of my routines, I am trying to pre-
fill a static c-array from a list of numpy ndarrays. Previously, I
did something like:
cdef double *w[30]
cdef int r[30],c[30]
and then I'd run through my list, and get the shape info and the data
pointer, and fill in these arrays. This works, but then I have to do
all my 2D -> 1D indexing, like:
w[k][i+c[k]*j]
which is ugly, and prone to typos. I'd like to do:
cdef np.ndarray w[30]
so I can do the nicer:
w[k][i,j]
I tried making an array of buffer objects, but I can only make local
versions of that. c-arrays of python objects are forbidden. Is
there a c-version of the ndarray?
thanks,
Brian Blais
--
Brian Blais
[email protected]
http://web.bryant.edu/~bblais
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev