Ondrej Certik wrote: > cdef double call_double_func(double x, void* ctx): > return (<DoubleFunction>ctx).evaluate(x)
Not sure about the specifics of ODE solving, but speaking about callbacks in general, it suffices to be able to pass an arbitrary callable object from Python. Any required context can be encapsulated by using a bound method or nested function as the callback. There is no need to require the Python code to provide an object with an "execute" method or anything like that. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
