[SciPy-User] How to set upper bound of subintervals in scipy.integrate.dblquad?

Moore, Eric (NIH/NIDDK) [F] eric.moore2 at nih.gov
Fri Nov 9 13:20:58 EST 2012


> -----Original Message-----
> From: scipy-user-bounces at scipy.org [mailto:scipy-user-
> bounces at scipy.org] On Behalf Of Andreas Pritschet
> Sent: Friday, November 09, 2012 1:00 PM
> To: scipy-user at scipy.org
> Subject: [SciPy-User] How to set upper bound of subintervals in
> scipy.integrate.dblquad?
> 
> Hi,
> I have noticed that for the function "quad" in scipy.integrate one can
> change the upper bound of subintervals by using the parameter "limit".
> 
> But I was unable to find a similar parameter for the "dblquad" function
> and it is rejecting the keyword "limit".
> 
> Does anybody have a suggestion?
> 
> Thanks
> Andi
> --
> Andreas Pritschet
> Phone:       +49 151 11728439
> Homepage:    http://www.pritschet.me
> GPG Pub Key: http://goo.gl/4mOsM

The dblquad function is only a few lines long.  I'd just copy it (and the necessary _infunc) from quadpack.py and modify them to support the limit keyword.  I don't know why that keyword isn't exposed in dblquad (I'd guess because you may want two limits and that would make a confusing interface), but since it is just calling quad(quad()), it should be quick to change things to solve your problem.

Good Luck!
 
Eric 



More information about the SciPy-User mailing list