File: calc_mean.py

package info (click to toggle)
python-deprecated 1.2.18-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,308 kB
  • sloc: python: 1,458; makefile: 32
file content (12 lines) | stat: -rw-r--r-- 343 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
def mean(values):
    """
    Compute the arithmetic mean (“average”) of values.

    :type  values: typing.List[float]
    :param values: List of floats
    :return: Mean of values.

    .. deprecated:: 2.5.0
       Since Python 3.4, you can use the standard function :func:`statistics.mean`.
    """
    return sum(values) / len(values)