@@ -687,21 +687,7 @@ def __getitem__(
687
687
if is_scalar (left ) and isna (left ):
688
688
return self ._fill_value
689
689
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 :
705
691
# GH#30588 multi-dimensional indexer disallowed
706
692
raise ValueError ("multi-dimensional indexing not allowed" )
707
693
return self ._shallow_copy (left , right )
@@ -1679,7 +1665,14 @@ def isin(self, values) -> np.ndarray:
1679
1665
# complex128 ndarray is much more performant.
1680
1666
left = self ._combined .view ("complex128" )
1681
1667
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]
1683
1676
1684
1677
elif needs_i8_conversion (self .left .dtype ) ^ needs_i8_conversion (
1685
1678
values .left .dtype
0 commit comments