How to integrate an array?

Robert Kern rkern at
Sun Sep 4 23:55:13 CEST 2005

Tom Kaz wrote:

[I wrote:] (please attribute quotes)
>>Do each function separately. The routine that scipy.integrate.quad uses
>>adapts to the local conditions of the function (when the function is
>>flat, it uses fewer samples; when steep, more).
> It's not so easy  to do it separately. I want to integrate function that
> includes  linalg.expm - as you see calculation the function is quite
> expensive. 

I understand, but the good integration algorithms really do need to
evaluate each dimension separately.

If you can bear algorithms that only use samples from fixed intervals,
then you can use the functions romb(), simps(), or trapz() in

BTW, a better place to ask scipy questions would be the scipy mailing list.

Robert Kern
rkern at

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

More information about the Python-list mailing list