summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_array_object.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-07-16 16:35:13 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-07-16 16:35:13 -0600
commita566cd1c7110d36d0e7a1f2746ea61e45f49eb89 (patch)
treedd329fbb11d6fe535d2b5305776fe13a2a56d70b /numpy/_array_api/_array_object.py
parent687e2a3b1ee167ae8dc359cf7e92b67e551dbbfe (diff)
downloadnumpy-a566cd1c7110d36d0e7a1f2746ea61e45f49eb89.tar.gz
Change the type hint for stream __dlpack__ to just None
Diffstat (limited to 'numpy/_array_api/_array_object.py')
-rw-r--r--numpy/_array_api/_array_object.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py
index 06cb1e925..4e3c7b344 100644
--- a/numpy/_array_api/_array_object.py
+++ b/numpy/_array_api/_array_object.py
@@ -300,11 +300,11 @@ class Array:
res = self._array.__bool__()
return res
- def __dlpack__(self: Array, /, *, stream: Optional[Union[int, Any]] = None) -> PyCapsule:
+ def __dlpack__(self: Array, /, *, stream: None = None) -> PyCapsule:
"""
Performs the operation __dlpack__.
"""
- res = self._array.__dlpack__(stream=None)
+ res = self._array.__dlpack__(stream=stream)
return self.__class__._new(res)
def __dlpack_device__(self: Array, /) -> Tuple[IntEnum, int]: