From c6f48c8a03c438da6e2d400752eff702d1234cfc Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Thu, 10 Aug 2006 12:48:04 +0000 Subject: Add output arguments to a few more functions for consistency --- numpy/numarray/functions.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'numpy/numarray/functions.py') diff --git a/numpy/numarray/functions.py b/numpy/numarray/functions.py index 1f358385c..73f3f80c9 100644 --- a/numpy/numarray/functions.py +++ b/numpy/numarray/functions.py @@ -40,7 +40,7 @@ import copy, copy_reg, types import os, sys, math, operator from numpy import dot as matrixmultiply, dot, vdot, ravel, concatenate, all,\ - allclose, any, argmax, argmin, around, argsort, array_equal, array_equiv,\ + allclose, any, around, argsort, array_equal, array_equiv,\ array_str, array_repr, average, CLIP, RAISE, WRAP, clip, concatenate, \ diagonal, e, pi, fromfunction, indices, inner as innerproduct, nonzero, \ outer as outerproduct, kron as kroneckerproduct, lexsort, putmask, rank, \ @@ -438,3 +438,9 @@ def cumsum(a1, axis=0, out=None, type=None, dim=0): def cumproduct(a1, axis=0, out=None, type=None, dim=0): return N.asarray(a1).cumprod(axis,dtype=type,out=out) +def argmax(x, axis=-1): + return N.argmax(x, axis) + +def argmin(x, axis=-1): + return N.argmin(x, axis) + -- cgit v1.2.1