diff options
author | yuki <drsuaimqjgar@gmail.com> | 2023-03-22 01:16:42 +0000 |
---|---|---|
committer | yuki <drsuaimqjgar@gmail.com> | 2023-03-22 01:16:42 +0000 |
commit | 6f1679c48d19198273c02379acd68cb8c601d21e (patch) | |
tree | a912b119658a714524f57fc704695ded1738d8bb /numpy/array_api | |
parent | 03edb7b8dddb12198509d2bf602ea8b382d27199 (diff) | |
parent | 294c7f2c893b7e5ef783fc1cb1912d06404b452b (diff) | |
download | numpy-6f1679c48d19198273c02379acd68cb8c601d21e.tar.gz |
Merge branch 'main' into enh-ma-dot
Diffstat (limited to 'numpy/array_api')
-rw-r--r-- | numpy/array_api/_typing.py | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/numpy/array_api/_typing.py b/numpy/array_api/_typing.py index dfa87b358..3f9b7186a 100644 --- a/numpy/array_api/_typing.py +++ b/numpy/array_api/_typing.py @@ -17,14 +17,12 @@ __all__ = [ "PyCapsule", ] -import sys from typing import ( Any, Literal, Sequence, Type, Union, - TYPE_CHECKING, TypeVar, Protocol, ) @@ -51,21 +49,20 @@ class NestedSequence(Protocol[_T_co]): def __len__(self, /) -> int: ... Device = Literal["cpu"] -if TYPE_CHECKING or sys.version_info >= (3, 9): - Dtype = dtype[Union[ - int8, - int16, - int32, - int64, - uint8, - uint16, - uint32, - uint64, - float32, - float64, - ]] -else: - Dtype = dtype + +Dtype = dtype[Union[ + int8, + int16, + int32, + int64, + uint8, + uint16, + uint32, + uint64, + float32, + float64, +]] + SupportsBufferProtocol = Any PyCapsule = Any |