From d372798ae6bf88c3a4414027341d2b0322941c68 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sat, 5 Aug 2006 07:50:50 +0000 Subject: Move location of flatnonzero --- numpy/lib/function_base.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 548af953d..a56233d34 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -8,7 +8,6 @@ __all__ = ['logspace', 'linspace', 'histogram', 'bincount', 'digitize', 'cov', 'corrcoef', 'msort', 'median', 'sinc', 'hamming', 'hanning', 'bartlett', 'blackman', 'kaiser', 'trapz', 'i0', 'add_newdoc', 'add_docstring', 'meshgrid', - 'flatnonzero' ] import types @@ -998,11 +997,4 @@ def meshgrid(x,y): y = y.reshape(numRows,1) Y = y.repeat(numCols, axis=1) return X, Y - -def flatnonzero(a): - """Return indicies that are not-zero in flattened version of a - - Equivalent to a.ravel().nonzero()[0] - """ - return a.ravel().nonzero()[0] -- cgit v1.2.1