diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-09-27 14:44:02 +0200 |
---|---|---|
committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-09-27 14:52:06 +0200 |
commit | 4f7e991960c24fc9548f8f3d6d5f8967c2ece84a (patch) | |
tree | 2f47a8e0019d67c183b80b6e60ea8fd97022eb49 /numpy/array_api/_typing.py | |
parent | a5beccfa3574f4fcb1b6030737b728e65803791f (diff) | |
download | numpy-4f7e991960c24fc9548f8f3d6d5f8967c2ece84a.tar.gz |
MAINT: Add a missing subscription slot to `NestedSequence`
Diffstat (limited to 'numpy/array_api/_typing.py')
-rw-r--r-- | numpy/array_api/_typing.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/array_api/_typing.py b/numpy/array_api/_typing.py index f66279fbc..4785f5fe3 100644 --- a/numpy/array_api/_typing.py +++ b/numpy/array_api/_typing.py @@ -16,7 +16,7 @@ __all__ = [ ] import sys -from typing import Any, Literal, Sequence, Type, Union, TYPE_CHECKING +from typing import Any, Literal, Sequence, Type, Union, TYPE_CHECKING, TypeVar from . import Array from numpy import ( @@ -35,7 +35,8 @@ from numpy import ( # This should really be recursive, but that isn't supported yet. See the # similar comment in numpy/typing/_array_like.py -NestedSequence = Sequence[Sequence[Any]] +_T = TypeVar("_T") +NestedSequence = Sequence[Sequence[_T]] Device = Literal["cpu"] if TYPE_CHECKING or sys.version_info >= (3, 9): |