We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f24c102 commit fda4ab0Copy full SHA for fda4ab0
array_api_compat/dask/array/_aliases.py
@@ -140,7 +140,9 @@ def asarray(
140
return da.array(obj, dtype=dtype)
141
else:
142
if not isinstance(obj, da.Array) or dtype is not None and obj.dtype != dtype:
143
- obj = np.asarray(obj, dtype=dtype)
+ # copy=True to be uniform across dask < 2024.12 and >= 2024.12
144
+ # see https://github.com/dask/dask/pull/11524/
145
+ obj = np.asarray(obj, dtype=dtype, copy=True)
146
return da.from_array(obj)
147
return obj
148
0 commit comments