From f6015d2754dde04342ca2a0d719ca7f01d6e0dcb Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 14 Jun 2021 15:30:28 -0600 Subject: Update a function signature from the array API spec --- numpy/_array_api/_array_object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/_array_api/_array_object.py') diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py index 30858b7c5..5f169ab66 100644 --- a/numpy/_array_api/_array_object.py +++ b/numpy/_array_api/_array_object.py @@ -22,7 +22,7 @@ from ._dtypes import _boolean_dtypes, _integer_dtypes, _floating_dtypes from typing import TYPE_CHECKING if TYPE_CHECKING: - from ._types import Optional, PyCapsule, Tuple, Union, array + from ._types import Any, Optional, PyCapsule, Tuple, Union, array import numpy as np @@ -186,7 +186,7 @@ class ndarray: res = self._array.__bool__() return res - def __dlpack__(self: array, /, *, stream: Optional[int] = None) -> PyCapsule: + def __dlpack__(self: array, /, *, stream: Optional[Union[int, Any]] = None) -> PyCapsule: """ Performs the operation __dlpack__. """ -- cgit v1.2.1