summaryrefslogtreecommitdiff
path: root/numpy/lib/arraysetops.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2019-11-06 16:13:30 -0700
committerGitHub <noreply@github.com>2019-11-06 16:13:30 -0700
commit718c63f9d2956ac0a962f0795fce5d8e7a1a1a77 (patch)
treee9ade33691d9801c996f6f6c1f65b9059ebfdf54 /numpy/lib/arraysetops.py
parent480dc6bc01aa465389fcad0c85502d25d954f579 (diff)
parente6a9c112bd3c08bfc4e51fa3c5345c0085c314ab (diff)
downloadnumpy-718c63f9d2956ac0a962f0795fce5d8e7a1a1a77.tar.gz
Merge pull request #14845 from mattip/revert-14800
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