def tplquad(func, a, b, gfun, hfun, qfun, rfun, args=(), epsabs=1.49e-08, epsrel=1.49e-08):
 def ranges0(*args):
  return [qfun(args[1], args[0]), rfun(args[1], args[0])]
 def ranges1(*args):
  return [gfun(args[0]), hfun(args[0])]
 ranges = [ranges0, ranges1, [a, b]]
 return nquad(func, ranges, args=args)

def tplquad ( func , a , b , gfun , hfun , qfun , rfun , args = ( ) , epsabs = 1.49e-08 , epsrel = 1.49e-08 ) : def ranges0 ( * args ) : return [ qfun ( args [ 1 ] , args [ 0 ] ) , rfun ( args [ 1 ] , args [ 0 ] ) ] def ranges1 ( * args ) : return [ gfun ( args [ 0 ] ) , hfun ( args [ 0 ] ) ] ranges = [ ranges0 , ranges1 , [ a , b ] ] return nquad ( func , ranges , args = args )
compute a triple integral .