NumPy · Function
np.polyfit
Fits a polynomial to data by minimizing squared error. It returns coefficients from the highest power to the constant term.
Last updated
- Since
- 1.4
Syntax
numpy.polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
numpy.poly1dnumpy.polynomial.Polynomial.fitnumpy.linalg.lstsqscipy.interpolate.UnivariateSpline