diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-20 17:58:45 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-20 17:58:45 +0000 |
commit | 622701d2159a7d25153db1bfc270d4b710c0eaa1 (patch) | |
tree | 09754f49d43628ae60f9f3b0194d9c2db35ee222 /numpy/core/fromnumeric.py | |
parent | 999b6cd79c2609225a5793db81c346cff0ceec7b (diff) | |
download | numpy-622701d2159a7d25153db1bfc270d4b710c0eaa1.tar.gz |
Clean up docstrings.
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index c3b5d031f..67d39cbcd 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -464,6 +464,13 @@ def round_(a, decimals=0): around = round_ def mean(a, axis=0, dtype=None): + """mean(a, axis=0, dtype=None) + Return the arithmetic mean. + + The mean is the sum of the elements divided by the number of elements. + + See also: average + """ try: mean = a.mean except AttributeError: @@ -476,8 +483,8 @@ def std(a, axis=0, dtype=None): The standard deviation is the square root of the average of the squared deviations from the mean, i.e. std = sqrt(mean((x - x.mean())**2)). - - For multidimensional arrays, std is computed by default along the first axis. + + See also: var """ try: std = a.std @@ -486,6 +493,14 @@ def std(a, axis=0, dtype=None): return std(axis, dtype) def var(a, axis=0, dtype=None): + """var(sample, axis=0, dtype=None) + Return the variance, a measure of the spread of a distribution. + + The variance is the average of the squared deviations from the mean, + i.e. var = mean((x - x.mean())**2). + + See also: std + """ try: var = a.var except AttributeError: |