diff options
author | mattip <matti.picus@gmail.com> | 2019-11-06 14:27:50 -0700 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-11-06 14:27:50 -0700 |
commit | e6a9c112bd3c08bfc4e51fa3c5345c0085c314ab (patch) | |
tree | e9ade33691d9801c996f6f6c1f65b9059ebfdf54 /numpy/lib/arraysetops.py | |
parent | 480dc6bc01aa465389fcad0c85502d25d954f579 (diff) | |
download | numpy-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.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 |