nimble.calculate.median

nimble.calculate.median(values)

The median 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

mean, mode

Examples

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