Skip to content

Commit 7c734db

Browse files
Update array_api_compat/cupy/_aliases.py
Co-authored-by: Lucas Colley <[email protected]>
1 parent e1da0d6 commit 7c734db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_compat/cupy/_aliases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def astype(
121121
if device is None:
122122
return x.astype(dtype=dtype, copy=copy)
123123
out = _helpers.to_device(x.astype(dtype=dtype, copy=False), device)
124-
return out.copy() if copy and out is x else x
124+
return out.copy() if copy and out is x else out
125125

126126

127127
# These functions are completely new here. If the library already has them

0 commit comments

Comments
 (0)