diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-03-30 13:53:11 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-03-30 13:53:11 -0600 |
commit | 7ce435c610fcd7fee01da9d9e7ff5c1ab4ae6ef6 (patch) | |
tree | 6cddffc39ea4219559a7789265a48c53b4192cfd /numpy/_array_api/_array_object.py | |
parent | 479c8a24121465bbb9e0e193dc2da39cd08bdfe4 (diff) | |
download | numpy-7ce435c610fcd7fee01da9d9e7ff5c1ab4ae6ef6.tar.gz |
Update some annotations updated from the spec
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 4b11a0ca0..ad0cbc71e 100644 --- a/numpy/_array_api/_array_object.py +++ b/numpy/_array_api/_array_object.py @@ -106,7 +106,7 @@ class ndarray: res = self._array.__and__(asarray(other)._array) return self.__class__._new(res) - def __array_namespace__(self, /, *, api_version=None): + def __array_namespace__(self: array, /, *, api_version: Optional[str] = None) -> object: if api_version is not None: raise ValueError("Unrecognized array API version") from numpy import _array_api @@ -274,7 +274,7 @@ class ndarray: # ndarray() form, like a list of booleans. raise IndexError("Only integers, slices (`:`), ellipsis (`...`), and boolean arrays are valid indices in the array API namespace") - def __getitem__(self: array, key: Union[int, slice, Tuple[Union[int, slice], ...], array], /) -> array: + def __getitem__(self: array, key: Union[int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], array], /) -> array: """ Performs the operation __getitem__. """ |