From 4f7e991960c24fc9548f8f3d6d5f8967c2ece84a Mon Sep 17 00:00:00 2001 From: Bas van Beek <43369155+BvB93@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:44:02 +0200 Subject: MAINT: Add a missing subscription slot to `NestedSequence` --- numpy/array_api/_typing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'numpy/array_api') 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): -- cgit v1.2.1