@@ -78,17 +78,17 @@ async def test_order(
7878 path = "order"
7979 spath = StorePath (store , path = path )
8080
81- with config . set ({ "array.order" : runtime_write_order }):
82- a = await zarr . api . asynchronous . create_array (
83- spath ,
84- shape = data . shape ,
85- chunks = ( 16 , 8 ) if with_sharding else ( 32 , 8 ) ,
86- shards = ( 32 , 8 ) if with_sharding else None ,
87- dtype = data . dtype ,
88- fill_value = 0 ,
89- chunk_key_encoding = { "name" : "v2" , "separator" : "." } ,
90- filters = [ TransposeCodec ( order = order_from_dim ( store_order , data . ndim ))] ,
91- )
81+ a = await zarr . api . asynchronous . create_array (
82+ spath ,
83+ shape = data . shape ,
84+ chunks = ( 16 , 8 ) if with_sharding else ( 32 , 8 ) ,
85+ shards = ( 32 , 8 ) if with_sharding else None ,
86+ dtype = data . dtype ,
87+ fill_value = 0 ,
88+ chunk_key_encoding = { "name" : "v2" , "separator" : "." } ,
89+ filters = [ TransposeCodec ( order = order_from_dim ( store_order , data . ndim ))] ,
90+ config = { " order" : runtime_write_order } ,
91+ )
9292
9393 await _AsyncArrayProxy (a )[:, :].set (data )
9494 read_data = await _AsyncArrayProxy (a )[:, :].get ()
@@ -364,42 +364,10 @@ def test_invalid_metadata(store: Store) -> None:
364364
365365@pytest .mark .parametrize ("store" , ["local" , "memory" ], indirect = ["store" ])
366366def test_invalid_metadata_create_array (store : Store ) -> None :
367- spath3 = StorePath (store , "invalid_order" )
368- with pytest .raises (TypeError ):
369- zarr .create_array (
370- spath3 ,
371- shape = (16 , 16 ),
372- chunks = (16 , 16 ),
373- dtype = np .dtype ("uint8" ),
374- fill_value = 0 ,
375- filters = [
376- TransposeCodec (order = "F" ), # type: ignore[arg-type]
377- ],
378- )
379- spath5 = StorePath (store , "invalid_inner_chunk_shape" )
380- with pytest .raises (ValueError ):
381- zarr .create_array (
382- spath5 ,
383- shape = (16 , 16 ),
384- shards = (16 , 16 ),
385- chunks = (8 ,),
386- dtype = np .dtype ("uint8" ),
387- fill_value = 0 ,
388- )
389- spath6 = StorePath (store , "invalid_inner_chunk_shape" )
390- with pytest .raises (ValueError ):
391- zarr .create_array (
392- spath6 ,
393- shape = (16 , 16 ),
394- shards = (16 , 16 ),
395- chunks = (8 , 7 ),
396- dtype = np .dtype ("uint8" ),
397- fill_value = 0 ,
398- )
399- spath7 = StorePath (store , "warning_inefficient_codecs" )
367+ spath = StorePath (store , "warning_inefficient_codecs" )
400368 with pytest .warns (UserWarning ):
401369 zarr .create_array (
402- spath7 ,
370+ spath ,
403371 shape = (16 , 16 ),
404372 chunks = (16 , 16 ),
405373 dtype = np .dtype ("uint8" ),
0 commit comments