Skip to content

Commit

Permalink
Ensure chunks are ordered in TestIO.generate when testing xdas.dask.c…
Browse files Browse the repository at this point in the history
…ore.
  • Loading branch information
atrabattoni committed Sep 17, 2024
1 parent 4c595ce commit f4efdfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/dask/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def generate(self, tmpdir):
chunks = np.split(expected, 5, axis=1)
for idx, chunk in enumerate(chunks):
np.save(os.path.join(tmpdir, f"chunk_{idx}.npy"), chunk)
paths = glob(os.path.join(tmpdir, "*.npy"))
paths = sorted(glob(os.path.join(tmpdir, "*.npy")))
chunks = [dask.delayed(np.load)(path) for path in paths]
chunks = [
dask.array.from_delayed(chunk, shape=(3, 2), dtype=expected.dtype)
Expand Down

0 comments on commit f4efdfe

Please sign in to comment.