diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-10-18 18:13:39 +0200 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-10-18 18:29:38 +0200 |
commit | d74bea12d19dd92c9cf07cac35e94d45fb331832 (patch) | |
tree | 1b3c21cd751e723bd9d00945a93bf5b7aee71dfc /numpy/array_api/_array_object.py | |
parent | 3952e8f1390629078fdb229236b3b1ce40140c32 (diff) | |
download | numpy-d74bea12d19dd92c9cf07cac35e94d45fb331832.tar.gz |
MAINT: Replace the `__array_namespace__` return type with `Any`
Replace `object` as it cannot be used for expressing the objects in the array namespace.
Diffstat (limited to 'numpy/array_api/_array_object.py')
-rw-r--r-- | numpy/array_api/_array_object.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/array_api/_array_object.py b/numpy/array_api/_array_object.py index 830319e8c..ef66c5efd 100644 --- a/numpy/array_api/_array_object.py +++ b/numpy/array_api/_array_object.py @@ -29,7 +29,7 @@ from ._dtypes import ( _dtype_categories, ) -from typing import TYPE_CHECKING, Optional, Tuple, Union +from typing import TYPE_CHECKING, Optional, Tuple, Union, Any if TYPE_CHECKING: from ._typing import PyCapsule, Device, Dtype @@ -382,7 +382,7 @@ class Array: def __array_namespace__( self: Array, /, *, api_version: Optional[str] = None - ) -> object: + ) -> Any: if api_version is not None and not api_version.startswith("2021."): raise ValueError(f"Unrecognized array API version: {api_version!r}") return array_api |