Skip to content

Commit cca1785

Browse files
committed
Add multi-device support for utils
1 parent bae7482 commit cca1785

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_strict/_utility_functions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def all(
2121
2222
See its docstring for more information.
2323
"""
24-
return Array._new(np.asarray(np.all(x._array, axis=axis, keepdims=keepdims)))
24+
return Array._new(np.asarray(np.all(x._array, axis=axis, keepdims=keepdims)), device=x.device)
2525

2626

2727
def any(
@@ -36,4 +36,4 @@ def any(
3636
3737
See its docstring for more information.
3838
"""
39-
return Array._new(np.asarray(np.any(x._array, axis=axis, keepdims=keepdims)))
39+
return Array._new(np.asarray(np.any(x._array, axis=axis, keepdims=keepdims)), device=x.device)

0 commit comments

Comments
 (0)