[SciPy-User] Optimizing integration routine
Mon Nov 22 13:15:08 CST 2010
I am interested in calculating many integrals of the form f(x,y,A,B)dxdy, hence integrating over x,y given parameters A,B,....
Since I'm exploring parameter space A,B I was first doing nested for loops, i.e.
for iA in listA:
for iB in listB:
but the problem is that it just seems to take way too long. Is there a way this could be optimized? I figured I could vectorize f and make A, B numpy arrays but scipy dbquad would give me "the function does not return a valid float" message.
Or would rewriting this in C/Fortran be any more efficient?
Any hints/ideas are appreciated. Thank you for your time
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User