diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-09-22 19:42:43 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-09-22 19:42:43 +0000 |
commit | 310b6d0be5f3277a4bb233564e2b476b676ad646 (patch) | |
tree | aff876c03ed08bc01de3d47ee042fd2e08bdbb0d /numpy/core/fromnumeric.py | |
parent | 98940062227b324d22dc2b81b9a4814dd9acfc57 (diff) | |
download | numpy-310b6d0be5f3277a4bb233564e2b476b676ad646.tar.gz |
Switch order of .put arguments to match the function call. Eliminate .putmask as a method and make it only a function.
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 533f4a468..061b8bd9f 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1,7 +1,7 @@ # Module containing non-deprecated functions borrowed from Numeric. # functions that are now methods -__all__ = ['take', 'reshape', 'choose', 'repeat', 'put', 'putmask', +__all__ = ['take', 'reshape', 'choose', 'repeat', 'put', 'swapaxes', 'transpose', 'sort', 'argsort', 'argmax', 'argmin', 'searchsorted', 'alen', 'resize', 'diagonal', 'trace', 'ravel', 'nonzero', 'shape', @@ -94,14 +94,7 @@ def put (a, ind, v, mode='raise'): for i in ind: a.flat[i] = v[i] a must be a contiguous numpy array. """ - return a.put(v,ind, mode) - -def putmask (a, mask, v): - """putmask(a, mask, v) results in a = v for all places mask is true. - If v is shorter than mask it will be repeated as necessary. - In particular v can be a scalar or length 1 array. - """ - return a.putmask(v, mask) + return a.put(ind, v, mode) def swapaxes(a, axis1, axis2): """swapaxes(a, axis1, axis2) returns array a with axis1 and axis2 |