Correction:

> def myfunc(numpy.ndarray arr):
>     if arr.nd != 2 or arr.dtype != numpy.dtype(numpy.uint8):
>       raise ValueError("Must pass 2-dimensional uint8 array.")
>     cdef unsigned char* arr_buf = <unsigned char*>arr.data
>     arr.data[4 * arr.strides[0] + 5 * arr.strides[1]] = 10
>   
Last line should index arr_buf, not arr.data.


BTW,
> perfect, but perhaps in a few years we can have something that will 
> finally kill FORTRAN :-)
>   
In case you were wondering, this is definitely a joke. One can hope though.


-- 
Dag Sverre

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to