[Cython] Passing numpy buffers into a cdef function
Brett Calcott
brett.calcott at gmail.com
Wed May 6 10:21:11 CEST 2009
2009/5/6 Dag Sverre Seljebotn <dagss at student.matnat.uio.no>:
>
> You can't. You have to do
>
> cdef func(elements_)
> cdef np.ndarray[double, ndim=2] elements = elements_
>
> and there's a certain overhead.
>
> This will likely be fixed during summer.
>
> http://trac.cython.org/cython_trac/ticket/177
>
Hi Dag, thanks for the info. I'll just stick with some ugly code for now
then :)
Cheers,
Brett
More information about the Cython-dev
mailing list