listtools.arithmetic_mean — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »

# listtools.arithmetic_mean

`abjad.tools.listtools.` `arithmetic_mean`(l)

  New in version 1.1.1.

  Return the arithmetic mean of the elements in iterable l.

  Where possible return an exact integer.

      abjad> l = [1, 2, 2, 20, 30]
      abjad> listtools.arithmetic_mean(l)
      11

  Otherwise return a rational.

      abjad> l = [1, 2, 20]
      abjad> listtools.arithmetic_mean(l)
      Rational(23, 3)

  Never return a float.

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »