From 01a0309eca710b4128df2c9b5ce3a6905281df4b Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sun, 13 Aug 2006 07:15:52 +0000 Subject: Change default axis argument of average and several masked array functions. Move old behaviors to compatibility layer. --- numpy/numarray/functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'numpy/numarray') 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) -- cgit v1.2.1