We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aca16d6 commit feae86bCopy full SHA for feae86b
array_api_compat/cupy/_aliases.py
@@ -87,7 +87,8 @@ def asarray(
87
if copy is False:
88
raise NotImplementedError("asarray(copy=False) is not yet supported in cupy")
89
90
- with _helpers._device_ctx(cp, device):
+ like = obj if _helpers.is_cupy_array(obj) else None
91
+ with _helpers._device_ctx(cp, device, like=like):
92
if copy is None:
93
return cp.asarray(obj, dtype=dtype, **kwargs)
94
else:
0 commit comments