Source

pypy / lib_pypy / numpypy / lib / function_base.py

Full commit
__all__ = ['average']

from _numpypy import array

def average(a):
    # This implements a weighted average, for now we don't implement the
    # weighting, just the average part!
    if not hasattr(a, "mean"):
        a = array(a)
    return a.mean()