@@ -2042,14 +2042,14 @@ async def test_async_oindex(self, store, indexer, expected):
2042
2042
2043
2043
@pytest .mark .asyncio
2044
2044
async def test_async_oindex_with_zarr_array (self , store ):
2045
- z1 = zarr .create_array (store = store , shape = (2 , 2 ), chunks = (1 , 1 ), zarr_format = 3 , dtype = "i8" )
2045
+ group = zarr .create_group (store = store , zarr_format = 3 )
2046
+
2047
+ z1 = group .create_array (name = "z1" , shape = (2 , 2 ), chunks = (1 , 1 ), dtype = "i8" )
2046
2048
z1 [...] = np .array ([[1 , 2 ], [3 , 4 ]])
2047
2049
async_zarr = z1 ._async_array
2048
2050
2049
2051
# create boolean zarr array to index with
2050
- z2 = zarr .create_array (
2051
- store = store , name = "z2" , shape = (2 ,), chunks = (1 ,), zarr_format = 3 , dtype = "?"
2052
- )
2052
+ z2 = group .create_array (name = "z2" , shape = (2 ,), chunks = (1 ,), dtype = "?" )
2053
2053
z2 [...] = np .array ([True , False ])
2054
2054
2055
2055
result = await async_zarr .oindex .getitem (z2 )
@@ -2075,14 +2075,14 @@ async def test_async_vindex(self, store, indexer, expected):
2075
2075
2076
2076
@pytest .mark .asyncio
2077
2077
async def test_async_vindex_with_zarr_array (self , store ):
2078
- z1 = zarr .create_array (store = store , shape = (2 , 2 ), chunks = (1 , 1 ), zarr_format = 3 , dtype = "i8" )
2078
+ group = zarr .create_group (store = store , zarr_format = 3 )
2079
+
2080
+ z1 = group .create_array (name = "z1" , shape = (2 , 2 ), chunks = (1 , 1 ), dtype = "i8" )
2079
2081
z1 [...] = np .array ([[1 , 2 ], [3 , 4 ]])
2080
2082
async_zarr = z1 ._async_array
2081
2083
2082
2084
# create boolean zarr array to index with
2083
- z2 = zarr .create_array (
2084
- store = store , name = "z2" , shape = (2 , 2 ), chunks = (1 , 1 ), zarr_format = 3 , dtype = "?"
2085
- )
2085
+ z2 = group .create_array (name = "z2" , shape = (2 , 2 ), chunks = (1 , 1 ), dtype = "?" )
2086
2086
z2 [...] = np .array ([[False , True ], [False , True ]])
2087
2087
2088
2088
result = await async_zarr .vindex .getitem (z2 )
0 commit comments