Skip to content

Commit

Permalink
Merge branch 'main' into fix/v2meta_fill_serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
moradology authored Feb 26, 2025
2 parents 29faec3 + 64b9a37 commit 54920df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,20 +827,20 @@ def test_set_orthogonal_selection_1d(store: StorePath) -> None:
_test_set_orthogonal_selection(v, a, z, selection)


def test_set_item_1d_last_two_chunks():
def test_set_item_1d_last_two_chunks(store: StorePath):
# regression test for GH2849
g = zarr.open_group("foo.zarr", zarr_format=3, mode="w")
g = zarr.open_group(store=store, zarr_format=3, mode="w")
a = g.create_array("bar", shape=(10,), chunks=(3,), dtype=int)
data = np.array([7, 8, 9])
a[slice(7, 10)] = data
np.testing.assert_array_equal(a[slice(7, 10)], data)

z = zarr.open_group("foo.zarr", mode="w")
z = zarr.open_group(store=store, mode="w")
z.create_array("zoo", dtype=float, shape=())
z["zoo"][...] = np.array(1) # why doesn't [:] work?
np.testing.assert_equal(z["zoo"][()], np.array(1))

z = zarr.open_group("foo.zarr", mode="w")
z = zarr.open_group(store=store, mode="w")
z.create_array("zoo", dtype=float, shape=())
z["zoo"][...] = 1 # why doesn't [:] work?
np.testing.assert_equal(z["zoo"][()], np.array(1))
Expand Down

0 comments on commit 54920df

Please sign in to comment.