From 1bd2d49ef378fb869d015cef32c3e44a4c03a8f0 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 8 Jan 2007 21:56:54 +0000 Subject: Whitespace cleanup. --- numpy/lib/arraysetops.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'numpy/lib/arraysetops.py') diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index ca0269772..fe08912e7 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -66,11 +66,11 @@ def ediff1d(ary, to_end = None, to_begin = None): # We'll save ourselves a copy of a potentially large array in the common # case where neither to_begin or to_end was given. ed = nm.hstack(arrays) - + return ed def unique1d(ar1, return_index=False): - """Find the unique elements of 1D array. + """Find the unique elements of 1D array. Most of the other array set operations operate on the unique arrays generated by this function. @@ -96,13 +96,13 @@ def unique1d(ar1, return_index=False): if ar.size == 0: if return_index: return nm.empty(0, nm.bool), ar else: return ar - + if return_index: perm = ar.argsort() aux = ar[perm] flag = nm.concatenate( ([True], aux[1:] != aux[:-1]) ) return perm[flag], aux[flag] - + else: ar.sort() flag = nm.concatenate( ([True], ar[1:] != ar[:-1]) ) @@ -138,7 +138,7 @@ def intersect1d_nu( ar1, ar2 ): :Parameters: - `ar1` : array - `ar2` : array - + :Returns: - `intersection` : array @@ -172,7 +172,7 @@ def setxor1d( ar1, ar2 ): aux = nm.concatenate((ar1, ar2)) if aux.size == 0: return aux - + aux.sort() # flag = ediff1d( aux, to_end = 1, to_begin = 1 ) == 0 flag = nm.concatenate( ([True], aux[1:] != aux[:-1], [True] ) ) -- cgit v1.2.1