- DataArray.polyfit(dim, deg, skipna=None, rcond=None, w=None, full=False, cov=False)#
Least squares polynomial fit.
This replicates the behaviour of numpy.polyfit but differs by skipping invalid values when skipna = True.
Hashable) – Coordinate along which to fit the polynomials.
int) – Degree of the fitting polynomial.
None, optional) – If True, removes all invalid values before fitting each 1D slices of the array. Default is True if data is stored in a dask.array or if there is any invalid values, False otherwise.
Dataset) – A single dataset which contains:
The coefficients of the best fit.
The residuals of the least-square computation (only included if full=True). When the matrix rank is deficient, np.nan is returned.
The effective rank of the scaled Vandermonde coefficient matrix (only included if full=True)
The singular values of the scaled Vandermonde coefficient matrix (only included if full=True)
The covariance matrix of the polynomial coefficient estimates (only included if full=False and cov=True)