[Cython] CEP1000: Native dispatch through callables

Dag Sverre Seljebotn d.s.seljebotn at astro.uio.no
Fri Apr 13 00:34:15 CEST 2012

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 numba part up):
> @numba # Compiles function using LLVM
> def f(x):
> return 3 * x
> print scipy.integrate.quad(f, 1, 2) # do many callbacks natively!
> Obviously, we want something standard, so that Cython functions can also
> be called in a fast way.
> This is very similar to CEP 523
> (http://wiki.cython.org/enhancements/nativecall), but rather than
> Cython-to-Cython, we want something that both SciPy, NumPy, numba,
> Cython, f2py, fwrap can implement.
> Here's my proposal; Travis seems happy to implement something like it
> for numba and parts of SciPy:
> http://wiki.cython.org/enhancements/nativecall

I'm sorry. HERE is the CEP:


Since writing that yesterday, I've moved more in the direction of 
wanting a zero-terminated list of overloads instead of providing a 
count, and have the fast protocol jump over the header (since version is 
available elsewhere), and just demand that the structure is 
sizeof(void*)-aligned in the first place rather than the complicated 


More information about the cython-devel mailing list