nimble.calculate.mean

nimble.calculate.mean(values)

The mean of the values in a vector.

This function requires numeric data and ignores any NaN values. Non-numeric values will results in NaN being returned.

Parameters:

values (nimble Base object) – Must be one-dimensional.

See also

median, mode

Examples

>>> lst = [0, 1, 2, float('nan'), float('nan'), 5]
>>> vector = nimble.data(lst)
>>> mean(vector)
2.0