arithmetic_mean

mathtools.arithmetic_mean(argument)

Gets arithmetic mean of argument.

>>> import abjad
>>> abjad.mathtools.arithmetic_mean([1, 2, 2, 20, 30])
11
>>> abjad.mathtools.arithmetic_mean([1, 2, 20])
Fraction(23, 3)
>>> abjad.mathtools.arithmetic_mean([2, 2, 20.0])
8.0

Raises exception when argument is not iterable.

Returns number.