8000
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.
1 parent fb11810 commit 1ac02eaCopy full SHA for 1ac02ea
src/zarr/api/asynchronous.py
@@ -579,7 +579,7 @@ async def array(
579
z = await create(**kwargs)
580
580 B0EA code>
581
# fill with data
582
- await z.setitem(slice(None), data)
+ await z.setitem(Ellipsis, data)
583
584
return z
585
tests/test_array.py
@@ -881,3 +881,10 @@ async def test_nbytes(
881
assert arr._async_array.nbytes == np.prod(arr.shape) * arr.dtype.itemsize
882
else:
883
assert arr.nbytes == np.prod(arr.shape) * arr.dtype.itemsize
884
+
885
886
+async def test_scalar_array() -> None:
887
+ arr = zarr.array(1.5)
888
+ assert arr[...] == 1.5
889
+ assert arr[()] == 1.5
890
+ assert arr.shape == ()
0 commit comments