Hello,

If I have an array of ints, as in numpy:

a=numpy.zeros(5,int)

and I call a cython function like:

myfun(a)

and in the cython I have:

cpdef myfun(c_numpy.ndarray A):

    # stuff here


how can I access the data pointer?  I tried:

    cdef int *ap=<int *> A.data

but that doesn't seem to work (it works for double *, but not int  
*).  I must be missing something really simple.


          thanks,

              Brian Blais


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

Reply via email to