summaryrefslogtreecommitdiff
path: root/numpy/lib/arraysetops.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2007-01-08 21:56:54 +0000
committerStefan van der Walt <stefan@sun.ac.za>2007-01-08 21:56:54 +0000
commit1bd2d49ef378fb869d015cef32c3e44a4c03a8f0 (patch)
tree43335baf1da0b6e9de0ad806e721a077e3cbfa45 /numpy/lib/arraysetops.py
parent98b6d48b07f4eadfb7d1fc41483debe7e07eecd6 (diff)
downloadnumpy-1bd2d49ef378fb869d015cef32c3e44a4c03a8f0.tar.gz
Whitespace cleanup.
Diffstat (limited to 'numpy/lib/arraysetops.py')
-rw-r--r--numpy/lib/arraysetops.py12
1 files changed, 6 insertions, 6 deletions
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] ) )