scipy/scipy — pull request #2789 by pdebuyl (2013-08-25 12:46:54+00:00)
Title: Add advise to use nquad instead of tplquad in some situations.

Add advice not to use tplquad for infinite boundaries.

Fixes gh-1585

Example:
import numpy as np
from scipy.integrate import nquad

def fx(x,y,z):
return np.exp(-x)
def fy(x,y,z):
return np.exp(-y)
def fz(x,y,z):
return np.exp(-z)
def fxyz(x,y,z):
return np.exp(-x-y-z)

print nquad(fx, [(0,np.inf), (0,1), (0,1) ] )
print nquad(fy, [(0,1), (0,np.inf), (0,1) ] )
print nquad(fz, [(0,1), (0,1), (0,np.inf) ] )
print nquad(fxyz, [(0,np.inf), (0,np.inf), (0,np.inf) ] )