summaryrefslogtreecommitdiff
path: root/numpy/_array_api
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-07-09 13:56:34 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-07-09 13:56:34 -0600
commit5780a9bb5f662891da39eae80961455aaba0f6ac (patch)
tree270af67af21b76ecdca443267062c1c502ab3787 /numpy/_array_api
parent4240314ed1e77e0b9d4546e654871274faca3e64 (diff)
downloadnumpy-5780a9bb5f662891da39eae80961455aaba0f6ac.tar.gz
Remove typing exports from numpy/_array_api/_types.py
Diffstat (limited to 'numpy/_array_api')
-rw-r--r--numpy/_array_api/_creation_functions.py7
-rw-r--r--numpy/_array_api/_manipulation_functions.py4
-rw-r--r--numpy/_array_api/_types.py7
3 files changed, 7 insertions, 11 deletions
diff --git a/numpy/_array_api/_creation_functions.py b/numpy/_array_api/_creation_functions.py
index 8fb2a8b12..9e9722a55 100644
--- a/numpy/_array_api/_creation_functions.py
+++ b/numpy/_array_api/_creation_functions.py
@@ -1,11 +1,10 @@
from __future__ import annotations
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, List, Optional, Tuple, Union
if TYPE_CHECKING:
- from ._types import (List, Optional, SupportsDLPack,
- SupportsBufferProtocol, Tuple, Union, Array, Device,
- Dtype)
+ from ._types import (NestedSequence, SupportsDLPack,
+ SupportsBufferProtocol, Array, Device, Dtype)
from collections.abc import Sequence
from ._dtypes import _all_dtypes
diff --git a/numpy/_array_api/_manipulation_functions.py b/numpy/_array_api/_manipulation_functions.py
index c569d2834..fa0c08d7b 100644
--- a/numpy/_array_api/_manipulation_functions.py
+++ b/numpy/_array_api/_manipulation_functions.py
@@ -2,9 +2,7 @@ from __future__ import annotations
from ._array_object import Array
-from typing import TYPE_CHECKING
-if TYPE_CHECKING:
- from ._types import Optional, Tuple, Union
+from typing import List, Optional, Tuple, Union
import numpy as np
diff --git a/numpy/_array_api/_types.py b/numpy/_array_api/_types.py
index d365e5e8c..050ad4031 100644
--- a/numpy/_array_api/_types.py
+++ b/numpy/_array_api/_types.py
@@ -6,11 +6,10 @@ annotations in the function signatures. The functions in the module are only
valid for inputs that match the given type annotations.
"""
-__all__ = ['Any', 'List', 'Literal', 'Optional', 'Tuple', 'Union', 'Array',
- 'Device', 'Dtype', 'SupportsDLPack', 'SupportsBufferProtocol',
- 'PyCapsule']
+__all__ = ['Array', 'Device', 'Dtype', 'SupportsDLPack',
+ 'SupportsBufferProtocol', 'PyCapsule']
-from typing import Any, List, Literal, Optional, Tuple, Union, TypeVar
+from typing import Any, Sequence, Type, Union
from . import (Array, int8, int16, int32, int64, uint8, uint16, uint32,
uint64, float32, float64)