xarray.Dataset.weighted

xarray.Dataset.weighted#

Dataset.weighted(weights)[source]#

Weighted Dataset 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 by weights.fillna(0).

Returns

core.weighted.DatasetWeighted

See also

DataArray.weighted

Weighted array reductions

User guide on weighted array reduction using weighted()

Weighted Reductions

Tutorial on Weighted Reduction using weighted()