原文链接:https://zhuanlan.zhihu.com/p/28149195 1.最小二乘拟合 实例1 import numpy as np import matplotlib.pyplot as plt from scipy.optimize import leastsq plt.figure(figsize=(9,9)) x=np.linspace(0,10,1000) X = np.array([8.19, 2.72, 6.39, 8.71, 4.7, 2.66, 3.78]) Y…