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/oldnumeric/functions.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/oldnumeric/functions.py')
-rw-r--r-- | numpy/oldnumeric/functions.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/oldnumeric/functions.py b/numpy/oldnumeric/functions.py index e18f12aa8..4e3f12639 100644 --- a/numpy/oldnumeric/functions.py +++ b/numpy/oldnumeric/functions.py @@ -9,7 +9,8 @@ __all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue', 'cumsum', 'cumproduct', 'compress', 'ones', 'empty', 'identity', 'zeros', 'array', 'asarray', 'nonzero', 'reshape', 'arange', 'fromstring', 'ravel', 'trace', - 'indices', 'where','sarray','cross_product', 'argmax', 'argmin'] + 'indices', 'where','sarray','cross_product', 'argmax', 'argmin', + 'average'] def take(a, indicies, axis=0): return N.take(a, indicies, axis) @@ -115,3 +116,6 @@ def where(condition, x, y): def cross_product(a, b, axis1=-1, axis2=-1): return N.cross(a, b, axis1, axis2) + +def average(a, axis=0, weights=None, returned=False): + return N.average(a, axis, weights, returned) |