weighted
- UnitsAwareDataArray.weighted(weights: DataArray) DataArrayWeighted
Weighted DataArray operations.
- Parameters:
weights (DataArray) – An array of weights associated with the values in this Dataset. Each value in the data contributes to the reduction operation according to its associated weight.
Notes
weights
must be a DataArray and cannot contain missing values. Missing values can be replaced byweights.fillna(0)
.- Return type:
core.weighted.DataArrayWeighted
See also
Dataset.weighted
- Weighted array reductions
User guide on weighted array reduction using
weighted()
- xarray-tutorial:fundamentals/03.4_weighted
Tutorial on Weighted Reduction using
weighted()