title: Integration with "quad" and "quadrature" from Python/SciPy
body: <p>After reading <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.quad.html">this</a> and <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.quadrature.html">that</a>, it occurs to me that both "quad" and "quadrature" should be interchangeable*, atleast syntax-wise. Strangely it does seem they are not:</p>
  
  <pre><code>from scipy.integrate import quad as q
  #from scipy.integrate import quadrature as q
  
  def myfunc(x):
      return x
  
  def integr():
      return q(myfunc, 0, 1)[0]
  
  print integr()
  
  
  def myfunc2(x, y):
      return x + y
  
  def integr2(y):
      return q(myfunc2, 0, 1, args=(y))[0]
      #return q(myfunc2, 0, 1, args=[y])[0] 
  
  print integr2(10)
  </code></pre>
  
  <p>... the example runs fine for "quad", but not for "quadrature" - I end up with:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./test.py", line 38, in &lt;module&gt;
      print integr2(10)
    File "./test.py", line 36, in integr2
      return q(myfunc2, 0, 1, args=(y))[0]
    File "/usr/lib/python2.6/dist-packages/scipy/integrate/quadrature.py", line 136, in quadrature
      newval = fixed_quad(vfunc, a, b, (), n)[0]
    File "/usr/lib/python2.6/dist-packages/scipy/integrate/quadrature.py", line 48, in fixed_quad
      return (b-a)/2.0*sum(w*func(y,*args),0), None
    File "/usr/lib/python2.6/dist-packages/scipy/integrate/quadrature.py", line 77, in vfunc
      return func(x, *args)
  TypeError: myfunc2() argument after * must be a sequence, not int
  </code></pre>
  
  <p>I have to switch the args tuple to a list (cf. commented line in integr2) even though the documentation says it should be a tuple. It seemed this is what the interpreter complains about ... (right?)</p>
  
  <p>Is this intended? Or am I doing something wrong? In the end I'd like to be able to choose integration methods afterwards without having to change too much of the rest of the code.</p>
  
  <p>*Actually I don't really get how to choose between the two. I do understand the difference between Gaussian quadrature and adaptive quadrature, but I don't know what "adaptive Gaussian quadrature" is supposed to mean - is the number of nodes adapted, if so how!?</p>