title: numpy/scipy analog of matlab's fminsearch
body: <p>I am converting some Matlab code into python using <a href="http://www.numpy.org/">numpy</a>. Everything worked pretty smoothly but recently I encountered <a href="http://www.mathworks.com/help/matlab/ref/fminsearch.html">fminsearch</a> function. </p>
  
  <p>So, to cut it short: is there an easy way to make in python something like this:</p>
  
  <pre><code>banana = @(x)100*(x(2)-x(1)^2)^2+(1-x(1))^2;
  [x,fval] = fminsearch(banana,[-1.2, 1])
  </code></pre>
  
  <p>which will return </p>
  
  <pre><code>x = 1.0000    1.0000
  fval = 8.1777e-010
  </code></pre>
  
  <p>Up till now I have not found anything that looks similar in numpy. The only thing that I found similar is <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin.html">scipy.optimize.fmin</a>. Based on the definition it</p>
  
  <blockquote>
    <p>Minimize a function using the downhill simplex algorithm.</p>
  </blockquote>
  
  <p>But right now I can not find to write the above-mentioned Matlab code using this function</p>