diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-11-06 16:13:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-06 16:13:30 -0700 |
commit | 718c63f9d2956ac0a962f0795fce5d8e7a1a1a77 (patch) | |
tree | e9ade33691d9801c996f6f6c1f65b9059ebfdf54 /numpy/lib/arraysetops.py | |
parent | 480dc6bc01aa465389fcad0c85502d25d954f579 (diff) | |
parent | e6a9c112bd3c08bfc4e51fa3c5345c0085c314ab (diff) | |
download | numpy-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.py | 8 |
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 |