diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-28 19:46:08 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-28 19:46:08 +0000 |
commit | 0f23250d0f7f84f1c69ccd85d13338714343d4c1 (patch) | |
tree | 48d8356353a0738a31a8a73fb55241c03bfd8471 /numpy/lib/function_base.py | |
parent | 59286e9133cfc1d71b92313e0b0443e31f03e8ce (diff) | |
download | numpy-0f23250d0f7f84f1c69ccd85d13338714343d4c1.tar.gz |
Merge changes mistakenly added to 1.0b4 tag to the main trunk
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 3be679a03..9df31f463 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1,13 +1,13 @@ -__all__ = ['logspace', 'linspace', +u__all__ = ['logspace', 'linspace', 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', #'base_repr', 'binary_repr', 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp', - 'unique', 'extract', 'insert', 'nansum', 'nanmax', 'nanargmax', + 'unique', 'extract', 'place', 'nansum', 'nanmax', 'nanargmax', 'nanargmin', 'nanmin', 'vectorize', 'asarray_chkfinite', 'average', 'histogram', 'bincount', 'digitize', 'cov', 'corrcoef', 'msort', 'median', 'sinc', 'hamming', 'hanning', 'bartlett', 'blackman', 'kaiser', 'trapz', 'i0', 'add_newdoc', 'add_docstring', 'meshgrid', - 'deletefrom', 'insertinto', 'appendonto' + 'delete', 'insert', 'append' ] import types @@ -545,7 +545,7 @@ def extract(condition, arr): """ return _nx.take(ravel(arr), nonzero(ravel(condition))[0]) -def insert(arr, mask, vals): +def place(arr, mask, vals): """Similar to putmask arr[mask] = vals but the 1D array vals has the same number of elements as the non-zero values of mask. Inverse of extract. @@ -1011,7 +1011,7 @@ def meshgrid(x,y): Y = y.repeat(numCols, axis=1) return X, Y -def deletefrom(arr, obj, axis=None): +def delete(arr, obj, axis=None): """Return a new array with sub-arrays along an axis deleted. Return a new array with the sub-arrays (i.e. rows or columns) @@ -1117,7 +1117,7 @@ def deletefrom(arr, obj, axis=None): else: return new -def insertinto(arr, obj, values, axis=None): +def insert(arr, obj, values, axis=None): """Return a new array with values inserted along the given axis before the given indices @@ -1205,7 +1205,7 @@ def insertinto(arr, obj, values, axis=None): return wrap(new) return new -def appendonto(arr, values, axis=None): +def append(arr, values, axis=None): """Append to the end of an array along axis (ravel first if None) """ arr = asanyarray(arr) @@ -1215,3 +1215,4 @@ def appendonto(arr, values, axis=None): values = ravel(values) axis = arr.ndim-1 return concatenate((arr, values), axis=axis) + |