diff --git a/pandas/core/indexes/interval.py b/pandas/core/indexes/interval.py index 561cf436c9af4..7372dada3b48a 100644 --- a/pandas/core/indexes/interval.py +++ b/pandas/core/indexes/interval.py @@ -1250,15 +1250,9 @@ def _intersection_non_unique(self, other: "IntervalIndex") -> "IntervalIndex": first_nan_loc = np.arange(len(self))[self.isna()][0] mask[first_nan_loc] = True - lmiss = other.left.get_indexer_non_unique(self.left)[1] - lmatch = np.setdiff1d(np.arange(len(self)), lmiss) - - for i in lmatch: - potential = other.left.get_loc(self.left[i]) - if is_scalar(potential): - if self.right[i] == other.right[potential]: - mask[i] = True - elif self.right[i] in other.right[potential]: + other_tups = set(zip(other.left, other.right)) + for i, tup in enumerate(zip(self.left, self.right)): + if tup in other_tups: mask[i] = True return self[mask]