summaryrefslogtreecommitdiff
path: root/numpy/lib/arraysetops.py
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-11-06 14:27:50 -0700
committermattip <matti.picus@gmail.com>2019-11-06 14:27:50 -0700
commite6a9c112bd3c08bfc4e51fa3c5345c0085c314ab (patch)
treee9ade33691d9801c996f6f6c1f65b9059ebfdf54 /numpy/lib/arraysetops.py
parent480dc6bc01aa465389fcad0c85502d25d954f579 (diff)
downloadnumpy-e6a9c112bd3c08bfc4e51fa3c5345c0085c314ab.tar.gz
MAINT: revert gh-14800, which gave precedence to OO->O over OO->?
Diffstat (limited to 'numpy/lib/arraysetops.py')
-rw-r--r--numpy/lib/arraysetops.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index cf45e181b..2309f7e42 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -562,15 +562,11 @@ def in1d(ar1, ar2, assume_unique=False, invert=False):
if invert:
mask = np.ones(len(ar1), dtype=bool)
for a in ar2:
- # convert object arrays to bool
- # cannot use np.not_equal until 'S' and 'U' have loops
- mask &= (ar1 != a).astype(bool)
+ mask &= (ar1 != a)
else:
mask = np.zeros(len(ar1), dtype=bool)
for a in ar2:
- # convert object arrays to bool
- # cannot use np.equal until 'S' and 'U' have loops
- mask |= (ar1 == a).astype(bool)
+ mask |= (ar1 == a)
return mask
# Otherwise use sorting