title: python nonlinear least squares fitting
body: <p>I am a little out of my depth in terms of the math involved in my problem, so I apologise for any incorrect nomenclature.</p>
  
  <p>I was looking at using the scipy function leastsq, but am not sure if it is the correct function.
  I have the following equation:</p>
  
  <pre><code>eq = lambda PLP,p0,l0,kd : 0.5*(-1-((p0+l0)/kd) + np.sqrt(4*(l0/kd)+(((l0-p0)/kd)-1)**2))
  </code></pre>
  
  <p>I have data (8 sets) for all the terms except for kd (PLP,p0,l0). I need to find the value of kd by non-linear regression of the above equation.
  From the examples I have read, leastsq seems to not allow for the inputting of the data, to get the output I need.</p>
  
  <p>Thank you for your help</p>