summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/functions.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-08-10 12:48:04 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-08-10 12:48:04 +0000
commitc6f48c8a03c438da6e2d400752eff702d1234cfc (patch)
treefd032d49f4da991a440e64b462ccc60c3c02de55 /numpy/oldnumeric/functions.py
parentb772c977e5d4d71c78919ef941858ad438ee4986 (diff)
downloadnumpy-c6f48c8a03c438da6e2d400752eff702d1234cfc.tar.gz
Add output arguments to a few more functions for consistency
Diffstat (limited to 'numpy/oldnumeric/functions.py')
-rw-r--r--numpy/oldnumeric/functions.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/numpy/oldnumeric/functions.py b/numpy/oldnumeric/functions.py
index 3041a6159..e18f12aa8 100644
--- a/numpy/oldnumeric/functions.py
+++ b/numpy/oldnumeric/functions.py
@@ -6,10 +6,10 @@ import numpy.core.numeric as nn
from typeconv import convtypecode, convtypecode2
__all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue',
- 'cumsum', 'cumproduct',
+ 'cumsum', 'cumproduct', 'compress',
'ones', 'empty', 'identity', 'zeros', 'array', 'asarray',
'nonzero', 'reshape', 'arange', 'fromstring', 'ravel', 'trace',
- 'indices', 'where','sarray','cross_product']
+ 'indices', 'where','sarray','cross_product', 'argmax', 'argmin']
def take(a, indicies, axis=0):
return N.take(a, indicies, axis)
@@ -34,6 +34,15 @@ def cumsum(x, axis=0):
def cumproduct(x, axis=0):
return N.cumproduct(x, axis)
+
+def argmax(x, axis=-1):
+ return N.argmax(x, axis)
+
+def argmin(x, axis=-1):
+ return N.argmax(x, axis)
+
+def compress(condition, m, axis=-1):
+ return N.compress(condition, m, axis)
def ones(shape, typecode='l', savespace=0, dtype=None):
"""ones(shape, dtype=int) returns an array of the given