Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit e0405a5

Browse files
committed
Make NestedList admit sequences.
numpy will actually accept not just lists, but also tuples as array-like.
1 parent fdbb5f6 commit e0405a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy-stubs/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ _FloatObj = TypeVar("_FloatObj", bound=Union[floating, float])
6666
_Int = TypeVar("_Int", bool_, int8, int16, int32, int64)
6767
_IntObj = TypeVar("_IntObj", bound=Union[integer, int])
6868

69-
_NestedList = Union[List[_T], List[List[_T]], List[List[List[_T]]], List[List[List[List[_T]]]]]
69+
_NestedList = Union[Sequence[_NLT], Sequence[Sequence[_NLT]], Sequence[Sequence[Sequence[_NLT]]], Sequence[Sequence[Sequence[Sequence[_NLT]]]]]
7070

7171
class ndarray(Generic[_DType]):
7272
"""

0 commit comments

Comments
 (0)