1

I want to perform fitting using following Fit_Curve function but I'm getting the runtime error which may arise when the value of x is too small. But I don't want to change the value of x in my code. I read an answer related to this question that I need to perform sum simplification of fitting function. Is there any other way or easiest way to get rid of this error. Is it just a warning or is it an error? Does this warning effect my final result means fitting?

def Fit_Curve(x,a,beta,b,gamma):
   return (a*(x**beta)*np.exp(-b*(x**gamma)))
  matrix_check.py:105: RuntimeWarning: divide by zero encountered in 
   power return (a*(x**beta)*np.exp(-b*(x**gamma)))
Sheldore
  • 37,862
  • 7
  • 57
  • 71
jerry
  • 385
  • 6
  • 18

0 Answers0