On Thu, Oct 16, 2008 at 7:12 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to use scipy's quadrature like this:
>
> val, err = quadrature(func2, a, b, args=(f,))
>
> where func2 is my Cython function and "f" is a C function pointer,
> that will get executed from func2. The problem is, that "f" is passed
> to the Python quadrature function, so it needs to be wrapped.
> Currently what I do is:
>
>
> cdef class MyFunc:
>    cdef f2 thisptr

And here is a declaration of f2:

cdef extern from "cassembly.h":
    ctypedef double (*f2)(double x)
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to