We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 31b3ad4 + 1ac02ea commit a0c1c95Copy full SHA for a0c1c95
src/zarr/api/asynchronous.py
@@ -574,7 +574,7 @@ async def array(
574
z = await create(**kwargs)
575
576
# fill with data
577
- await z.setitem(slice(None), data)
+ await z.setitem(Ellipsis, data)
578
579
return z
580
tests/test_array.py
@@ -1088,3 +1088,10 @@ async def test_create_array_v2_no_shards(store: MemoryStore) -> None:
1088
shards=(5,),
1089
zarr_format=2,
1090
)
1091
+
1092
1093
+async def test_scalar_array() -> None:
1094
+ arr = zarr.array(1.5)
1095
+ assert arr[...] == 1.5
1096
+ assert arr[()] == 1.5
1097
+ assert arr.shape == ()
0 commit comments