title: Python curve fit library that allows me to assign bounds to parameters
body: <p>I'd like to be able to perform fits that allows me to fit an arbitrary curve function to data, and allows me to set arbitrary bounds on parameters, for example I want to fit function: </p>
  
  <pre><code>f(x) = a1(x-a2)^a3\cdot\exp(-\a4*x^a5)
  </code></pre>
  
  <p>and say: </p>
  
  <ul>
  <li><code>a2</code> is in following range: <code>(-1, 1)</code></li>
  <li><code>a3</code> and <code>a5</code> are positive</li>
  </ul>
  
  <p>There is nice <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html">scipy curve_fit</a>  function, but it doesn't allow to specify parameter bounds. There also is nice <a href="http://code.google.com/p/pyminuit/">http://code.google.com/p/pyminuit/</a> library that does generic minimalization, and it allows to set bounds on parameters, but in my case it did not coverge. </p>