From fc1ff6fc3045482a72c359689ee7bfa7e3299985 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Thu, 8 Jul 2021 16:56:27 -0600 Subject: Capitalize the names of the type hint types in the array API That way they aren't ambiguous with the attributes with the same names. --- numpy/_array_api/_utility_functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy/_array_api/_utility_functions.py') diff --git a/numpy/_array_api/_utility_functions.py b/numpy/_array_api/_utility_functions.py index e280b5785..a6a7721dd 100644 --- a/numpy/_array_api/_utility_functions.py +++ b/numpy/_array_api/_utility_functions.py @@ -4,11 +4,11 @@ from ._array_object import ndarray from typing import TYPE_CHECKING if TYPE_CHECKING: - from ._types import Optional, Tuple, Union, array + from ._types import Optional, Tuple, Union, Array import numpy as np -def all(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keepdims: bool = False) -> array: +def all(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keepdims: bool = False) -> Array: """ Array API compatible wrapper for :py:func:`np.all `. @@ -16,7 +16,7 @@ def all(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keep """ return ndarray._new(np.asarray(np.all(x._array, axis=axis, keepdims=keepdims))) -def any(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keepdims: bool = False) -> array: +def any(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keepdims: bool = False) -> Array: """ Array API compatible wrapper for :py:func:`np.any `. -- cgit v1.2.1