title: scipy.optimize.curvefit: Asymmetric error in fit
body: <p>I try to fit a function to my data using <code>scipy.optimize.curvefit</code>.</p>
  
  <pre><code>Q=optimization.curve_fit(func,X,Y, x0,ERR)
  </code></pre>
  
  <p>and it works well. </p>
  
  <p>However, now I am trying to use an asymmetric error and I have no idea how to do that - or even if it is possible. </p>
  
  <p>By asymmetric error I mean that the error is not for example: <code>3+-0.5</code> but <code>3 +0.6 -0.2</code>. 
  So that ERR is an array with two columns. </p>
  
  <p>It would be great if somebody had an idea how to do that - or could me point to a different Python routine which might be able to do it. </p>
  
  <p>That a snippet of the code I am using - but I am not sure it makes it clearer:</p>
  
  <pre><code>A=numpy.genfromtxt('WF.dat')
  cc=A[:,4]
  def func(A,a1,b1,c1):
      N=numpy.zeros(len(x))
      for i in range(len(x)):
          N[i]=1.0*erf(a1*(A[i,1]-c1*A[i,0]**b1))
  
  return N
  
  
  x0   = numpy.array([2.5  , -0.07 ,-5.0])
  Q=optimization.curve_fit(func,A,cc, x0, Error)
  </code></pre>
  
  <p>And Error=[ErP,ErM] (2 columns) </p>