cf.Data.root_mean_square¶

Data.
root_mean_square
(axes=None, squeeze=False, mtol=1, weights=None, inplace=False, _preserve_partitions=False)[source]¶ TODO Collapse axes with their weighted mean.
The weighted mean, \(\mu\), for array elements \(x_i\) and corresponding weights elements \(w_i\) is
\[\mu=\frac{\sum w_i x_i}{\sum w_i}\]Missing data array elements and their corresponding weights are omitted from the calculation.
 Parameters
 axes: (sequence of) int, optional
The axes to be collapsed. By default flattened input is used. Each axis is identified by its integer position. No axes are collapsed if axes is an empty sequence.
 squeeze:
bool
, optional If True then collapsed axes are removed. By default the axes which are collapsed are left in the result as axes with size 1, meaning that the result is guaranteed to broadcast correctly against the original array.
 weights: datalike or dict, optional
Weights associated with values of the array. By default all nonmissing elements of the array are assumed to have a weight equal to one. If weights is a datalike object then it must have either the same shape as the array or, if that is not the case, the same shape as the axes being collapsed. If weights is a dictionary then each key is axes of the array (an int or tuple of ints) with a corresponding datalike value of weights for those axes. In this case, the implied weights array is the outer product of the dictionary’s values.
 Parameter example:
If
weights={1: w, (2, 0): x}
thenw
must contain 1dimensional weights for axis 1 andx
must contain 2dimensional weights for axes 2 and 0. This is equivalent, for example, toweights={(1, 2, 0), y}
, wherey
is the outer product ofw
andx
. Ifaxes=[1, 2, 0]
thenweights={(1, 2, 0), y}
is equivalent toweights=y
. Ifaxes=None
and the array is 3dimensional thenweights={(1, 2, 0), y}
is equivalent toweights=y.transpose([2, 0, 1])
.
mtol: number, optional
 Returns
Examples:
TODO