diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-13 07:15:52 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-13 07:15:52 +0000 |
commit | 01a0309eca710b4128df2c9b5ce3a6905281df4b (patch) | |
tree | 763d1e30b193a225625cefea5be5d210c02a641f /numpy/lib/function_base.py | |
parent | 9584e277a057c490606cd8abb9100962f4676070 (diff) | |
download | numpy-01a0309eca710b4128df2c9b5ce3a6905281df4b.tar.gz |
Change default axis argument of average and several masked array functions. Move old behaviors to compatibility layer.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 098632ead..a62b3569e 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1,4 +1,3 @@ - __all__ = ['logspace', 'linspace', 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', #'base_repr', 'binary_repr', @@ -100,8 +99,8 @@ def histogram(a, bins=10, range=None, normed=False): else: return n, bins -def average(a, axis=0, weights=None, returned=False): - """average(a, axis=0, weights=None, returned=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), but |