numpy 1.24.3 Pypi GitHub Homepage
Other Docs

NotesParametersRaisesReturnsBackRef
polyfit(x, y, deg, rcond=None, full=False, w=None)

Notes

Parameters

x : array_like, shape (`M`,)
y : array_like, shape (`M`,) or (`M`, `K`)
deg : int or 1-D array_like
rcond : float, optional
full : bool, optional
w : array_like, shape (`M`,), optional

Raises

RankWarning

Returns

coef : ndarray, shape (`deg` + 1,) or (`deg` + 1, `K`)
[residuals, rank, singular_values, rcond] : list

See Also

numpy.linalg.lstsq

numpy.polynomial.chebyshev.chebfit
numpy.polynomial.hermite.hermfit
numpy.polynomial.hermite_e.hermefit
numpy.polynomial.laguerre.lagfit
numpy.polynomial.legendre.legfit
polyval

polyvander

scipy.interpolate.UnivariateSpline

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.polynomial.laguerre:lagfit numpy.polynomial.hermite_e:hermefit numpy.polynomial.hermite:hermfit numpy.polynomial.chebyshev:chebfit numpy.polynomial.legendre:legfit

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/polynomial/polynomial.py#1214
type: <class 'function'>
Commit: