xarray.computation.weighted.DataArrayWeighted (original) (raw)
class xarray.computation.weighted.DataArrayWeighted(obj, weights)[source]#
__init__(obj, weights)[source]#
Create a Weighted object
Parameters:
- obj (DataArray or Dataset) – Object over which the weighted reduction operation is applied.
- weights (DataArray) – An array of weights associated with the values in the obj. Each value in the obj 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)
.
Methods
Attributes