cf.Data.sum_of_squares¶
-
Data.
sum_of_squares
(axes=None, squeeze=False, mtol=1, weights=None, inplace=False, _preserve_partitions=False)[source]¶ Collapse axes with the sum of the squares of the values.
Missing data array elements are omitted from the calculation.
See also
max
,min
,mean
,mid_range
,range
,sample_size
,sd
,sum_of_weights
,sum_of_weights2
,var
- Parameters
axes : (sequence of) int, optional
squeeze : bool, optional
- Returns
Examples:
>>> d = cf.Data([[-1, 2, 3], [9, -8, -12]], 'm') >>> d.sum_of_squares() <CF Data(1, 1): [[303]] m2> >>> d.sum_of_squares(axes=1) <CF Data(2, 1): [[14, 289]] m2>