Skip to content

Commit af7f6e0

Browse files
authored
changes in comments.
1 parent e058e05 commit af7f6e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/arrays/interval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,7 +2100,6 @@ def isin(self, values: ArrayLike) -> npt.NDArray[np.bool_]:
21002100
return np.zeros(self.shape, dtype=bool)
21012101

21022102
if self.dtype == values.dtype:
2103-
# GH#38353 instead of casting to object, operating on a
21042103
left = self._combined
21052104
right = values._combined
21062105
return np.isin(left, right).ravel()
@@ -2119,10 +2118,11 @@ def _combined(self) -> IntervalSide:
21192118
# has no attribute "reshape" [union-attr]
21202119
left = self.left._values.reshape(-1, 1) # type: ignore[union-attr]
21212120
right = self.right._values.reshape(-1, 1) # type: ignore[union-attr]
2121+
# GH#38353 instead of casting to object, operating on a
2122+
# complex128 ndarray is much more performant.
21222123
if needs_i8_conversion(left.dtype):
21232124
# error: Item "ndarray[Any, Any]" of "Any | ndarray[Any, Any]" has
21242125
# no attribute "_concat_same_type"
2125-
# complex128 ndarray is much more performant.
21262126
comb = left._concat_same_type( # type: ignore[union-attr]
21272127
[left, right], axis=1
21282128
)

0 commit comments

Comments
 (0)