Scipy.integrate.quad Ctypes Function Error "quadpack.error: Quad: First Argument Is A Ctypes Function Pointer With Incorrect Signature"
I am trying to use scipy.integrate.nquad with a ctypes function. I exactly followed the instruction on Faster integration using Ctypes. ctypes integration can be done in a few sim
Solution 1:
The type of the argument should be: ctypes.POINTER(ctypes.c_double)
But have you considered using cffi
? Besides being faster than ctypes
, you also don't have to hand-write the argument stuff, just copy the C declarations and let cffi
parse them.
Post a Comment for "Scipy.integrate.quad Ctypes Function Error "quadpack.error: Quad: First Argument Is A Ctypes Function Pointer With Incorrect Signature""