Re: [Cython] CEP1000: Native dispatch through callables

2012-04-18 Thread Stefan Behnel
Dag Sverre Seljebotn, 18.04.2012 23:35: > from numpy import sqrt, sin > > cdef double f(double x): > return sqrt(x * x) # or sin(x * x) > > Of course, here one could get the pointer in the module at import time. That optimisation would actually be very worthwhile all by itself. I mean, we kn

Re: [Cython] CEP1000: Native dispatch through callables

2012-04-18 Thread Dag Sverre Seljebotn
On 04/18/2012 11:35 PM, Dag Sverre Seljebotn wrote: On 04/17/2012 02:24 PM, Dag Sverre Seljebotn wrote: On 04/13/2012 12:11 AM, Dag Sverre Seljebotn wrote: Travis Oliphant recently raised the issue on the NumPy list of what mechanisms to use to box native functions produced by his Numba so that

Re: [Cython] CEP1000: Native dispatch through callables

2012-04-18 Thread Dag Sverre Seljebotn
On 04/17/2012 02:24 PM, Dag Sverre Seljebotn wrote: On 04/13/2012 12:11 AM, Dag Sverre Seljebotn wrote: Travis Oliphant recently raised the issue on the NumPy list of what mechanisms to use to box native functions produced by his Numba so that SciPy functions can call it, e.g. (I'm making the nu