However I still don't understand about the shape of the memory view. Please see the example below
from cpython.array cimport array as pyarray
from cpython cimport array
cdef int w=100, h=100
cdef pyarray arr0 = array.clone(pyarray('d', []), w*h, zero=True)
cdef double[:] myview_0 = arr0
cdef double[:, :] myview_1 = <double[:w, :h]> &myview_0[0]
print (myview_1.shape)
I was expecting to get shape=(100, 100) but I got [100, 100, 0, 0, 0, 0, 0, 0]
info:
python 2 (and 3), cython 0.22pre (and 0.22), Windows (and Linux too).
Did I miss anything?
thanks
Hai