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/numarray/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/numarray/functions.py')
-rw-r--r-- | numpy/numarray/functions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/numarray/functions.py b/numpy/numarray/functions.py index c990fe7e9..55922e9fe 100644 --- a/numpy/numarray/functions.py +++ b/numpy/numarray/functions.py @@ -42,7 +42,7 @@ import os, sys, math, operator from numpy import dot as matrixmultiply, dot, vdot, ravel, concatenate, all,\ allclose, any, around, argsort, array_equal, array_equiv,\ - array_str, array_repr, average, CLIP, RAISE, WRAP, clip, concatenate, \ + array_str, array_repr, CLIP, RAISE, WRAP, clip, concatenate, \ diagonal, e, pi, fromfunction, indices, inner as innerproduct, nonzero, \ outer as outerproduct, kron as kroneckerproduct, lexsort, putmask, rank, \ resize, searchsorted, shape, size, sort, swapaxes, trace, transpose @@ -453,3 +453,6 @@ def newobj(self, type): def togglebyteorder(self): self.dtype=self.dtype.newbyteorder() + +def average(a, axis=0, weights=None, returned=0): + return N.average(a, axis, weights, returned) |