Skip to content

Commit 11fbea5

Browse files
authored
Be explicit when opening Zarr arrays (#296)
1 parent e1eb827 commit 11fbea5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cubed/tests/primitive/test_blockwise.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_blockwise(tmp_path, executor, reserved_mem):
6161

6262
execute_pipeline(pipeline, executor=executor)
6363

64-
res = zarr.open(target_store)
64+
res = zarr.open_array(target_store)
6565
assert_array_equal(res[:], np.outer([0, 1, 2], [10, 50, 100]))
6666

6767

@@ -124,7 +124,7 @@ def test_blockwise_with_args(tmp_path, executor):
124124

125125
execute_pipeline(pipeline, executor=executor)
126126

127-
res = zarr.open(target_store)
127+
res = zarr.open_array(target_store)
128128
assert_array_equal(
129129
res[:], np.transpose(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), axes=(1, 0))
130130
)

cubed/tests/primitive/test_rechunk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_rechunk(
9292
for pipeline in pipelines:
9393
execute_pipeline(pipeline, executor=executor)
9494

95-
res = zarr.open(target_store)
95+
res = zarr.open_array(target_store)
9696
assert_array_equal(res[:], np.ones(shape))
9797
assert res.chunks == target_chunks
9898

cubed/tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_to_zarr(tmp_path, spec, executor):
141141
a = xp.asarray([[1, 2, 3], [4, 5, 6], [7, 8, 9]], chunks=(2, 2), spec=spec)
142142
output = tmp_path / "output.zarr"
143143
cubed.to_zarr(a, output, executor=executor)
144-
res = zarr.open(output)
144+
res = zarr.open_array(output)
145145
assert_array_equal(res[:], np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]))
146146

147147

0 commit comments

Comments
 (0)