diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-01-20 18:25:20 -0700 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-01-20 18:25:20 -0700 |
| commit | 1efd55efa8cac9afd12d299dcf8912a7a7ac8a68 (patch) | |
| tree | ff6111d9091b0a96cfebc15a3ae5bab5a96e27b4 /numpy/_array_api/_searching_functions.py | |
| parent | ad19f7f7dfcfe33fd4591f1be3b4d9d30887899a (diff) | |
| download | numpy-1efd55efa8cac9afd12d299dcf8912a7a7ac8a68.tar.gz | |
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.
Diffstat (limited to 'numpy/_array_api/_searching_functions.py')
| -rw-r--r-- | numpy/_array_api/_searching_functions.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/_array_api/_searching_functions.py b/numpy/_array_api/_searching_functions.py index d5128cca9..77e4710e5 100644 --- a/numpy/_array_api/_searching_functions.py +++ b/numpy/_array_api/_searching_functions.py @@ -11,7 +11,7 @@ def argmax(x: array, /, *, axis: int = None, keepdims: bool = False) -> array: See its docstring for more information. """ # Note: this currently fails as np.argmax does not implement keepdims - return np.asarray(np.argmax(x, axis=axis, keepdims=keepdims)) + return np.asarray(np.argmax._implementation(x, axis=axis, keepdims=keepdims)) def argmin(x: array, /, *, axis: int = None, keepdims: bool = False) -> array: """ @@ -20,7 +20,7 @@ def argmin(x: array, /, *, axis: int = None, keepdims: bool = False) -> array: See its docstring for more information. """ # Note: this currently fails as np.argmin does not implement keepdims - return np.asarray(np.argmin(x, axis=axis, keepdims=keepdims)) + return np.asarray(np.argmin._implementation(x, axis=axis, keepdims=keepdims)) def nonzero(x: array, /) -> Tuple[array, ...]: """ @@ -28,7 +28,7 @@ def nonzero(x: array, /) -> Tuple[array, ...]: See its docstring for more information. """ - return np.nonzero(x) + return np.nonzero._implementation(x) def where(condition: array, x1: array, x2: array, /) -> array: """ @@ -36,4 +36,4 @@ def where(condition: array, x1: array, x2: array, /) -> array: See its docstring for more information. """ - return np.where(condition, x1, x2) + return np.where._implementation(condition, x1, x2) |
