@@ -33,7 +33,7 @@ from numpy.typing import (
3333 # Arrays
3434 ArrayLike ,
3535 _NestedSequence ,
36- _RecursiveSequence ,
36+ _FiniteNestedSequence ,
3737 NDArray ,
3838 _ArrayLikeInt ,
3939
@@ -59,21 +59,19 @@ _ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any])
5959__all__ : List [str ]
6060
6161@overload
62- def ix_ (* args : _NestedSequence [_SupportsDType [_DType ]]) -> Tuple [ndarray [Any , _DType ], ...]: ...
62+ def ix_ (* args : _FiniteNestedSequence [_SupportsDType [_DType ]]) -> Tuple [ndarray [Any , _DType ], ...]: ...
6363@overload
64- def ix_ (* args : _NestedSequence [str ]) -> Tuple [NDArray [str_ ], ...]: ...
64+ def ix_ (* args : str | _NestedSequence [str ]) -> Tuple [NDArray [str_ ], ...]: ...
6565@overload
66- def ix_ (* args : _NestedSequence [bytes ]) -> Tuple [NDArray [bytes_ ], ...]: ...
66+ def ix_ (* args : bytes | _NestedSequence [bytes ]) -> Tuple [NDArray [bytes_ ], ...]: ...
6767@overload
68- def ix_ (* args : _NestedSequence [bool ]) -> Tuple [NDArray [bool_ ], ...]: ...
68+ def ix_ (* args : bool | _NestedSequence [bool ]) -> Tuple [NDArray [bool_ ], ...]: ...
6969@overload
70- def ix_ (* args : _NestedSequence [int ]) -> Tuple [NDArray [int_ ], ...]: ...
70+ def ix_ (* args : int | _NestedSequence [int ]) -> Tuple [NDArray [int_ ], ...]: ...
7171@overload
72- def ix_ (* args : _NestedSequence [float ]) -> Tuple [NDArray [float_ ], ...]: ...
72+ def ix_ (* args : float | _NestedSequence [float ]) -> Tuple [NDArray [float_ ], ...]: ...
7373@overload
74- def ix_ (* args : _NestedSequence [complex ]) -> Tuple [NDArray [complex_ ], ...]: ...
75- @overload
76- def ix_ (* args : _RecursiveSequence ) -> Tuple [NDArray [Any ], ...]: ...
74+ def ix_ (* args : complex | _NestedSequence [complex ]) -> Tuple [NDArray [complex_ ], ...]: ...
7775
7876class nd_grid (Generic [_BoolType ]):
7977 sparse : _BoolType
0 commit comments