From 1efd55efa8cac9afd12d299dcf8912a7a7ac8a68 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Wed, 20 Jan 2021 18:25:20 -0700 Subject: Use _implementation on all functions that have it in the array API submodule That way they only work on actual ndarray inputs, not array-like, which is more inline with the spec. --- numpy/_array_api/_utility_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 51a04dc8b..7e1d6ec6e 100644 --- a/numpy/_array_api/_utility_functions.py +++ b/numpy/_array_api/_utility_functions.py @@ -10,7 +10,7 @@ def all(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keep See its docstring for more information. """ - return np.asarray(np.all(x, axis=axis, keepdims=keepdims)) + return np.asarray(np.all._implementation(x, axis=axis, keepdims=keepdims)) def any(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keepdims: bool = False) -> array: """ @@ -18,4 +18,4 @@ def any(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keep See its docstring for more information. """ - return np.asarray(np.any(x, axis=axis, keepdims=keepdims)) + return np.asarray(np.any._implementation(x, axis=axis, keepdims=keepdims)) -- cgit v1.2.1