title: AttributeError: 'tuple' object has no attribute 'ravel'
body: <p>I'm trying to solve two simultaneous nonlinear equations using the <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.brute.html#scipy.optimize.brute" rel="nofollow noreferrer"><code>scipy.optimize.brute</code></a> function</p>
  
  <pre><code>import numpy as np
  import scipy.optimize as so
  
  def root2d(x,a,b):
     F1 = np.exp(-np.exp(-(x[0]+x[1]))) - x[1]*(b+x[0]**2)
     F2 = x[0]*np.cos(x[1]) + x[1]*np.sin(x[0]) - a
     return (F1,F2)
  
  a = 0.5
  b = 1
  
  x0 = np.array([-0.1,0.1]) # initial guesses
  
  rranges = (slice(-4,4,0.2),slice(-4,4,0.2))
  print(so.brute(root2d,rranges,args=(a,b),finish=so.fmin))
  </code></pre>
  
  <p>I get an error that I don't understand: <code>AttributeError: 'tuple' object has no attribute 'ravel'</code>. What does this mean and how do I fix my code (if it's possible)?</p>
  
  <p><strong>Edit:</strong> full error message</p>
  
  <pre><code>Traceback (most recent call last):
  
    File "&lt;ipython-input-2-29b9507fcb99&gt;", line 1, in &lt;module&gt;
      runfile('.../test')
  
    File "C:\WinPython\WinPython-64bit-3.5.2.3\python-3.5.2.amd64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
      execfile(filename, namespace)
  
    File "C:\WinPython\WinPython-64bit-3.5.2.3\python-3.5.2.amd64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
      exec(compile(f.read(), filename, 'exec'), namespace)
  
    File "../test.py", line 111, in &lt;module&gt;
      print(so.brute(root2d,rranges,args=(a,b),finish=so.fmin))
  
    File "C:\WinPython\WinPython-64bit-3.5.2.3\python-3.5.2.amd64\lib\site-packages\scipy\optimize\optimize.py", line 2711, in brute
      indx = argmin(Jout.ravel(), axis=-1)
  
  AttributeError: 'tuple' object has no attribute 'ravel'
  </code></pre>