cf.Data.sum_of_weights

Data.sum_of_weights(axes=None, squeeze=False, mtol=1, weights=None, inplace=False, i=False, _preserve_partitions=False)[source]

Collapse axes with the sum of weights.

Missing data array elements are omitted from the calculation.

Parameters

axes : (sequence of) int, optional

squeeze : bool, optional

{[inplace: bool, optional}}

i: deprecated at version 3.0.0

Use the inplace parameter instead.

Returns
Data or None

The collapsed array.

Examples: