diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py index 3263dd73fe4dc..9c2e85c4df564 100644 --- a/pandas/core/arrays/interval.py +++ b/pandas/core/arrays/interval.py @@ -764,7 +764,7 @@ def _cmp_method(self, other, op): if self.closed != other.categories.closed: return invalid_comparison(self, other, op) - other = other.categories.take( + other = other.categories._values.take( other.codes, allow_fill=True, fill_value=other.categories._na_value ) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 796aadf9e4061..2305c1cbb698e 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2172,11 +2172,6 @@ def _drop_level_numbers(self, levnums: list[int]): @final def _can_hold_na(self) -> bool: if isinstance(self.dtype, ExtensionDtype): - if isinstance(self.dtype, IntervalDtype): - # FIXME(GH#45720): this is inaccurate for integer-backed - # IntervalArray, but without it other.categories.take raises - # in IntervalArray._cmp_method - return True return self.dtype._can_hold_na if self.dtype.kind in "iub": return False