@@ -687,7 +687,21 @@ 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
- if np .ndim (left ) > 1 :
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]
691
705
# GH#30588 multi-dimensional indexer disallowed
692
706
raise ValueError ("multi-dimensional indexing not allowed" )
693
707
return self ._shallow_copy (left , right )
@@ -1665,13 +1679,7 @@ def isin(self, values) -> np.ndarray:
1665
1679
# complex128 ndarray is much more performant.
1666
1680
left = self ._combined .view ("complex128" )
1667
1681
right = values ._combined .view ("complex128" )
1668
- # Argument 1 to "in1d" has incompatible type "Union[ExtensionArray,
1669
- # ndarray[Any, Any], ndarray[Any, dtype[Any]]]"; expected
1670
- # "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[
1671
- # dtype[Any]]], bool, int, float, complex, str, bytes,
1672
- # _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"
1673
- # [arg-type]
1674
- return np .in1d (left , right ) # type: ignore[arg-type]
1682
+ return np .in1d (left , right )
1675
1683
1676
1684
elif needs_i8_conversion (self .left .dtype ) ^ needs_i8_conversion (
1677
1685
values .left .dtype
0 commit comments