summaryrefslogtreecommitdiff
path: root/numpy/lib/arraysetops.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/arraysetops.py')
-rw-r--r--numpy/lib/arraysetops.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index a454b8725..aa3a05e12 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -375,12 +375,8 @@ def setxor1d(ar1, ar2, assume_unique=False):
return aux
aux.sort()
-# flag = ediff1d( aux, to_end = 1, to_begin = 1 ) == 0
flag = np.concatenate(([True], aux[1:] != aux[:-1], [True]))
-# flag2 = ediff1d( flag ) == 0
-# flag2 = flag[1:] == flag[:-1]
-# return aux[flag2]
- return aux[np.logical_and(flag[1:], flag[:-1])]
+ return aux[flag[1:] & flag[:-1]]
def in1d(ar1, ar2, assume_unique=False, invert=False):