cf.Data.mid_range

Data.mid_range(axes=None, squeeze=True, mtol=1, i=False)[source]

Collapse axes with their mid range.

The mid range is the mean of the maximum and minimum.

d.mid_range() is equivalent to 0.5*(d.max() + d.min()).

Missing data array elements are omitted from the calculation.

Parameters :

axes : (sequence of) int, optional

squeeze : bool, optional

i : bool, optional

If True then update the data array in place. By default a new data array is created.

Returns :
out : cf.Data

The collapsed array.

See also

max, min, mean, sum, sd, var

Examples

Previous topic

cf.Data.mask_invalid

Next topic

cf.Data.ndindex

This Page