summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/oldnumeric/functions.py')
-rw-r--r--numpy/oldnumeric/functions.py6
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)