diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-08-06 17:15:39 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-08-06 17:15:39 -0600 |
commit | f13f08f6c00ff5debf918dd50546b3215e39a5b8 (patch) | |
tree | 80b52495aba5766037a9afb507f8cd091a2c20b9 /numpy/array_api/_searching_functions.py | |
parent | 1ae808401951bf8c4cbff97a30505f08741d811f (diff) | |
download | numpy-f13f08f6c00ff5debf918dd50546b3215e39a5b8.tar.gz |
Fix the array API nonzero() function
Diffstat (limited to 'numpy/array_api/_searching_functions.py')
-rw-r--r-- | numpy/array_api/_searching_functions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/array_api/_searching_functions.py b/numpy/array_api/_searching_functions.py index de5f43f3d..9dcc76b2d 100644 --- a/numpy/array_api/_searching_functions.py +++ b/numpy/array_api/_searching_functions.py @@ -29,7 +29,7 @@ def nonzero(x: Array, /) -> Tuple[Array, ...]: See its docstring for more information. """ - return Array._new(np.nonzero(x._array)) + return tuple(Array._new(i) for i in np.nonzero(x._array)) def where(condition: Array, x1: Array, x2: Array, /) -> Array: """ |