diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2006-10-10 23:15:58 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2006-10-10 23:15:58 +0000 |
commit | f52ca5b51b089962f3870107b2a6b8ccdcae2286 (patch) | |
tree | af2474c4d1d73405c262215fcc1a06f90726c592 /numpy/lib/function_base.py | |
parent | 349a84138004e47925a39e5d7144b3b0f47d4389 (diff) | |
download | numpy-f52ca5b51b089962f3870107b2a6b8ccdcae2286.tar.gz |
Simplify mean and average docstrings.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index c1431c87c..d7c4311af 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -230,14 +230,11 @@ def histogramdd(sample, bins=10, range=None, normed=False): def average(a, axis=None, weights=None, returned=False): """average(a, axis=None weights=None, returned=False) - Average the array over the given axis. If the axis is None, average - over all dimensions of the array. Equivalent to a.mean(axis) + Average the array over the given axis. If the axis is None, + average over all dimensions of the array. Equivalent to + a.mean(axis) and to - If an integer axis is given, this equals: - a.sum(axis) * 1.0 / len(a) - - If axis is None, this equals: - a.sum(axis) * 1.0 / product(a.shape,axis=0) + a.sum(axis) * 1.0 / size(a, axis) If weights are given, result is: sum(a * weights,axis) / sum(weights,axis), |