Skip to content

Commit

Permalink
BUG: dask.array: asarray(..., copy=None) copies in dask==2024.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ev-br committed Dec 5, 2024
1 parent d7b4111 commit 2442a92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ def test_asarray_copy(library):
b = asarray(a, copy=None)
assert is_lib_func(b)
a[0] = 0.0
if library == 'cupy':
if library in ('cupy', 'dask.array'):
# A copy is required for libraries where the default device is not CPU
# dask made a breaking change in 2024.12: copy=None copies
# https://github.com/dask/dask/pull/11524/
assert all(b[0] == 1.0)
else:
assert all(b[0] == 0.0)

0 comments on commit 2442a92

Please sign in to comment.