cf.Data.mean_absolute_value

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

Collapse axes with their mean absolute value.

Missing data elements are omitted from the calculation.

See also

max, min, mean, mid_range, sum, sd, var

Parameters:
axes : (sequence of) int, optional

TODO

weights: TODO

squeeze : bool, optional

TODO

inplace: bool, optional

If True then do the operation in-place and return None.

Returns:
Data or None

The collapsed data, or None if the operation was in-place.

Examples:

>>> d = cf.Data([[-1, 2, 3], [9, -8, -12]], 'm')                              
>>> d.mean_absolute_value()                                              
<CF Data(1, 1): [[5.833333333333333]] m>
>>> d.mean_absolute_value(axes=1)                                        
<CF Data(2, 1): [[2.0, 9.666666666666666]] m>