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

Commit

Permalink
Make NestedList admit sequences.
Browse files Browse the repository at this point in the history
numpy will actually accept not just lists, but also tuples as array-like.
  • Loading branch information
rpgoldman committed Mar 6, 2020
1 parent fdbb5f6 commit e0405a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _FloatObj = TypeVar("_FloatObj", bound=Union[floating, float])
_Int = TypeVar("_Int", bool_, int8, int16, int32, int64)
_IntObj = TypeVar("_IntObj", bound=Union[integer, int])

_NestedList = Union[List[_T], List[List[_T]], List[List[List[_T]]], List[List[List[List[_T]]]]]
_NestedList = Union[Sequence[_NLT], Sequence[Sequence[_NLT]], Sequence[Sequence[Sequence[_NLT]]], Sequence[Sequence[Sequence[Sequence[_NLT]]]]]

class ndarray(Generic[_DType]):
"""
Expand Down

0 comments on commit e0405a5

Please sign in to comment.