From 647ea1908cc33eb2f9fb6c5828cfb895f8663cc0 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 29 Oct 2019 23:10:31 +0200 Subject: WIP, DEP, ENH: finish richcompare changes from 1.10 --- numpy/lib/arraysetops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/lib/arraysetops.py') diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index 2309f7e42..c30ad534b 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -562,11 +562,11 @@ def in1d(ar1, ar2, assume_unique=False, invert=False): if invert: mask = np.ones(len(ar1), dtype=bool) for a in ar2: - mask &= (ar1 != a) + mask &= (ar1 != a).astype(bool) else: mask = np.zeros(len(ar1), dtype=bool) for a in ar2: - mask |= (ar1 == a) + mask |= (ar1 == a).astype(bool) return mask # Otherwise use sorting -- cgit v1.2.1