title: ValueError: Residuals are not finite in the initial point. with scipy least square
body: <pre><code>import originpro as op
  import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  from scipy.optimize import curve_fit
  
  def circle(ReZ,R1,R2):
      nImZ=(ReZ-R1)*np.sqrt(R2/(ReZ-R1)-1)
      return nImZ
  
  def Fit(func,used_x,used_y,bound,yerror):
      fit_para,fit_cov=curve_fit(func,used_x,used_y,bounds=bound,sigma=yerror,absolute_sigma=True)
      print(fit_para)
      return fit_para
  
  def yerror(ydata, p):
      output=[]
      for i in ydata:
          data=i*p
          output.append(data)
      return output
      
  def PrePlot(exp_x,exp_y,fit_x,fit_y):
      fig,ax=plt.subplots()
      fitline=ax.plot(fit_x,fit_y,marker='.',color='blue')
      expline=ax.scatter(exp_x,exp_y,s=20,marker='.',color='red')
      ax.legend(['Experimental','Fitted line'])
      plt.show()
  
  wkslist=range(83,109)    
  for wksnum in wkslist:
      wks=op.find_sheet('w','Book'+str(wksnum))
      xdata=wks.to_list(1)
      ydata=wks.to_list(2)
      bound=([3000,1*10**8],[6000,1*10**9])
      error=yerror(ydata, 0.1)
      fitRes=Fit(circle,xdata,ydata,bound,error)
      fit_x=xdata
      fit_y=[circle(x,fitRes[0],fitRes[1]) for x in fit_x]
      PrePlot(xdata,ydata,fit_x,fit_y)
  </code></pre>
  <p>I get the error for the second worksheet(wks)</p>
  <p>for the function used (circle), the condition is: when ReZ&gt;R1,  R1+R2&gt;=ReZ; when ReZ&lt;R1, R1+R2&lt;=ReZ</p>
  <p>The maximum ReZ in the xdata is 1.35e8, the minimum is 4353, which fits that condition with the given boundary.</p>
  <p>So I'm really confused here</p>