>>> def func(x, a, b, c): ... return a * np.exp(-b * x) + c
>>> import matplotlib.pyplot as plt >>> from scipy.optimize import curve_fit