@@ -687,21 +687,7 @@ def __getitem__(
687687 if is_scalar (left ) and isna (left ):
688688 return self ._fill_value
689689 return Interval (left , right , inclusive = self .inclusive )
690- # error: Argument 1 to "ndim" has incompatible type
691- # "Union[ndarray[Any, Any], ExtensionArray]"; expected
692- # "Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
693- # Union[Union[_SupportsArray[dtype[Any]],
694- # Sequence[_SupportsArray[dtype[Any]]],
695- # Sequence[Sequence[_SupportsArray[dtype[Any]]]],
696- # Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]],
697- # Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]]]],
698- # Union[bool, int, float, complex, str, bytes,
699- # Sequence[Union[bool, int, float, complex, str, bytes]],
700- # Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]],
701- # Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]],
702- # Sequence[Sequence[Sequence[Sequence[Union[bool, int, float,
703- # complex, str, bytes]]]]]]]]"
704- if np .ndim (left ) > 1 : # type: ignore[arg-type]
690+ if np .ndim (left ) > 1 :
705691 # GH#30588 multi-dimensional indexer disallowed
706692 raise ValueError ("multi-dimensional indexing not allowed" )
707693 return self ._shallow_copy (left , right )
@@ -1679,7 +1665,14 @@ def isin(self, values) -> np.ndarray:
16791665 # complex128 ndarray is much more performant.
16801666 left = self ._combined .view ("complex128" )
16811667 right = values ._combined .view ("complex128" )
1682- return np .in1d (left , right )
1668+ # error: Argument 1 to "in1d" has incompatible type
1669+ # "Union[ExtensionArray, ndarray[Any, Any],
1670+ # ndarray[Any, dtype[Any]]]"; expected
1671+ # "Union[_SupportsArray[dtype[Any]],
1672+ # _NestedSequence[_SupportsArray[dtype[Any]]], bool,
1673+ # int, float, complex, str, bytes, _NestedSequence[
1674+ # Union[bool, int, float, complex, str, bytes]]]"
1675+ return np .in1d (left , right ) # type: ignore[arg-type]
16831676
16841677 elif needs_i8_conversion (self .left .dtype ) ^ needs_i8_conversion (
16851678 values .left .dtype
0 commit comments