About "RuntimeWarning: invalid value in power ..." warnings. #727
-
xdata=np.array([10,20,30,60,120,180,360,720,1440]) def func(xdata,a,b,n): init=np.array([1,1,1]) best_val,covar= curve_fit(func,xdata,ydata,p0=init) Warning (from warnings module): Please help me how do I fix my RuntimeWarning..thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @onlyhope10, This code has nothing to do with Colour so I don't think this issue belongs here. That said what you are getting here is a warning that happened when Scipy tested values in the optimisation process and probably ended up raising a negative number to a fractional power or something along those lines. |
Beta Was this translation helpful? Give feedback.
-
Closing this one, feel free to continue the discussion though! |
Beta Was this translation helpful? Give feedback.
Hi @onlyhope10,
This code has nothing to do with Colour so I don't think this issue belongs here. That said what you are getting here is a warning that happened when Scipy tested values in the optimisation process and probably ended up raising a negative number to a fractional power or something along those lines.