summaryrefslogtreecommitdiff
path: root/numpy/array_api/_searching_functions.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-08-06 17:15:39 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-08-06 17:15:39 -0600
commitf13f08f6c00ff5debf918dd50546b3215e39a5b8 (patch)
tree80b52495aba5766037a9afb507f8cd091a2c20b9 /numpy/array_api/_searching_functions.py
parent1ae808401951bf8c4cbff97a30505f08741d811f (diff)
downloadnumpy-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.py2
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:
"""