@@ -815,14 +815,24 @@ def test_set_orthogonal_selection_1d(store: StorePath) -> None:
815
815
_test_set_orthogonal_selection (v , a , z , selection )
816
816
817
817
818
- def test_set_orthogonal_selection_1d_last_two_chunks ():
818
+ def test_set_item_1d_last_two_chunks ():
819
819
# regression test for GH2849
820
820
g = zarr .open_group ("foo.zarr" , zarr_format = 3 , mode = "w" )
821
821
a = g .create_array ("bar" , shape = (10 ,), chunks = (3 ,), dtype = int )
822
822
data = np .array ([7 , 8 , 9 ])
823
823
a [slice (7 , 10 )] = data
824
824
np .testing .assert_array_equal (a [slice (7 , 10 )], data )
825
825
826
+ z = zarr .open_group ("foo.zarr" , mode = "w" )
827
+ z .create_array ("zoo" , dtype = float , shape = ())
828
+ z ["zoo" ][...] = np .array (1 ) # why doesn't [:] work?
829
+ np .testing .assert_equal (z ["zoo" ][()], np .array (1 ))
830
+
831
+ z = zarr .open_group ("foo.zarr" , mode = "w" )
832
+ z .create_array ("zoo" , dtype = float , shape = ())
833
+ z ["zoo" ][...] = 1 # why doesn't [:] work?
834
+ np .testing .assert_equal (z ["zoo" ][()], np .array (1 ))
835
+
826
836
827
837
def _test_set_orthogonal_selection_2d (
828
838
v : npt .NDArray [np .int_ ],
0 commit comments