- geocat.comp.polynomial._ndpolyfit(x, y, axis=0, deg=1, rcond=None, full=False, w=None, cov=False, missing_value=nan, xarray_output=True)¶
An extension to numpy.polyfit function to support multi-dimensional arrays, Dask arrays, and missing values.
array_like) – X-coordinate, an iterable object of shape (M,), (M, 1), or (1, M) where M = y.shape(axis). It cannot have nan or missing values.
array_like) – Y-coordinate, an iterable containing the data. It could be list, numpy.ndarray, xarray.DataArray, Dask array. or any Iterable convertible to numpy.ndarray. In case of Dask Array, The data could be chunked. It is recommended not to chunk along the axis provided.
int, Optional) – Axis to fit the polynomial to. Defaults to 0.
int, Optional) – Degree of the fitting polynomial. Defaults to 1.
float, Optional) – Relative condition number of the fit. Defaults to None. Refer to numpy.polyfit for further details.
bool, Optional) – Switch determining nature of return value. Defaults to False. Refer to numpy.polyfit for further details.
array_like, Optional) – Weights applied to the y-coordinates of the sample points. Defaults to None. Refer to numpy.polyfit for further details.
bool, Optional) – Determines whether to return the covariance matrix. Defaults to False. Refer to numpy.polyfit for further details.
numpy.nan, Optional) – The value to be treated as missing. Default is numpy.nan
bool, Optional) – Determines the type of the output. If set to True the output would be of type xarray.DataArray and the some extra information are attached to the output as attributes. Otherwise, the output would be of type numpy.ndarray containing only the coefficients of the fitted polynomial. Defaults to True.
coefficients – An array containing the coefficients of the fitted polynomial.
- Return type