尝试拟合S形增长曲线,为什么会报TypeError?
def func1(x,K,a,r):
m = r*x
return K/(1+a * math.exp(m))
popt1,_ = curve_fit(func1,x,y)

关于 LearnKu
部分解决,换了numpy的exp方法,但又溢出了 D:\sumo\model.py:25: RuntimeWarning: overflow encountered in exp return K/(1+a * np.exp(m)) D:\sumo\model.py:28: OptimizeWarning: Covariance of the parameters could not be estimated popt1,_ = curve_fit(func1,x,y)