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.py30
1 files changed, 24 insertions, 6 deletions
diff --git a/numpy/array_api/_typing.py b/numpy/array_api/_typing.py
index 4ff718205..d530a91ae 100644
--- a/numpy/array_api/_typing.py
+++ b/numpy/array_api/_typing.py
@@ -6,21 +6,39 @@ annotations in the function signatures. The functions in the module are only
valid for inputs that match the given type annotations.
"""
-__all__ = ['Array', 'Device', 'Dtype', 'SupportsDLPack',
- 'SupportsBufferProtocol', 'PyCapsule']
+__all__ = [
+ "Array",
+ "Device",
+ "Dtype",
+ "SupportsDLPack",
+ "SupportsBufferProtocol",
+ "PyCapsule",
+]
from typing import Any, Sequence, Type, Union
-from . import (Array, int8, int16, int32, int64, uint8, uint16, uint32,
- uint64, float32, float64)
+from . import (
+ Array,
+ int8,
+ int16,
+ int32,
+ int64,
+ uint8,
+ uint16,
+ uint32,
+ uint64,
+ float32,
+ float64,
+)
# 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]]
Device = Any
-Dtype = Type[Union[[int8, int16, int32, int64, uint8, uint16,
- uint32, uint64, float32, float64]]]
+Dtype = Type[
+ Union[[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64]]
+]
SupportsDLPack = Any
SupportsBufferProtocol = Any
PyCapsule = Any