summaryrefslogtreecommitdiff
path: root/numpy/array_api/_typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/array_api/_typing.py')
-rw-r--r--numpy/array_api/_typing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/array_api/_typing.py b/numpy/array_api/_typing.py
index 831a108bc..5f937a56c 100644
--- a/numpy/array_api/_typing.py
+++ b/numpy/array_api/_typing.py
@@ -15,7 +15,7 @@ __all__ = [
"PyCapsule",
]
-from typing import Any, Sequence, Type, Union
+from typing import Any, Literal, Sequence, Type, Union
from . import (
Array,
@@ -35,7 +35,7 @@ from . import (
# similar comment in numpy/typing/_array_like.py
NestedSequence = Sequence[Sequence[Any]]
-Device = Any
+Device = Literal["cpu"]
Dtype = Type[
Union[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64]
]