[SciPy-user] Usage of integrate.tplquad

Nils Wagner nwagner at iam.uni-stuttgart.de
Mon Nov 6 08:09:28 CST 2006


Hi all,

I tried to compute a triple integral of the form

\int\limits_{-1}^1 \int\limits_{-1}^1 \int\limits_{-1}^1 h(r,s,t)
J(r,s,t) dr ds dt

  File "8node.py", line 124, in ?
    I,err = integrate.tplquad(lambda r,s,t :h(r,s,t)[i]*J(r,s,t),-1.,
1., lambda s,t:-1.,-1., lambda s,t:1.,1., lambda t:-1., lambda t:1.)
  File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py",
line 399, in tplquad
    return
dblquad(_infunc2,a,b,gfun,hfun,(func,qfun,rfun,args),epsabs=epsabs,epsrel=epsrel)
  File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py",
line 351, in dblquad
    return
quad(_infunc,a,b,(func,gfun,hfun,args),epsabs=epsabs,epsrel=epsrel)
  File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py",
line 187, in quad
    retval = _quad(func,a,b,args,full_output,epsabs,epsrel,limit,points)
  File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py",
line 251, in _quad
    return _quadpack._qagse(func,a,b,args,full_output,epsabs,epsrel,limit)
TypeError: a float is required
 
How can I resolve this problem ?

Nils


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8node.py
Type: text/x-python
Size: 3177 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20061106/5cea37ce/attachment.py 


More information about the SciPy-user mailing list