title: Constrained least-squares estimation in Python
body: <p>I'm trying to perform a constrained least-squares estimation using Scipy such that all of the coefficients are in the range <code>(0,1)</code> and sum to <code>1</code> (this functionality is implemented in Matlab's <code>LSQLIN</code> function).</p>
  
  <p>Does anybody have tips for setting up this calculation using Python/Scipy. I believe I should be using <code>scipy.optimize.fmin_slsqp()</code>, but am not entirely sure what parameters I should be passing to it.[1]</p>
  
  <p>Many thanks for the help,
  Nick</p>
  
  <p>[1] The one example in the documentation for <code>fmin_slsqp</code> is a bit difficult for me to parse without the referenced text -- and I'm new to using Scipy.</p>