@@ -1073,35 +1073,27 @@ def test_auto_partition_auto_shards(
10731073 where there are 8 or more chunks.
10741074 """
10751075 dtype = np .dtype ("uint8" )
1076- with pytest .warns (
1077- ZarrUserWarning ,
1078- match = "Automatic shard shape inference is experimental and may change without notice." ,
1079- ):
1080- with zarr .config .set ({"array.target_shard_size_bytes" : target_shard_size_bytes }):
1081- auto_shards , _ = _auto_partition (
1082- array_shape = array_shape ,
1083- chunk_shape = chunk_shape ,
1084- shard_shape = "auto" ,
1085- item_size = dtype .itemsize ,
1086- )
1076+ with zarr .config .set ({"array.target_shard_size_bytes" : target_shard_size_bytes }):
1077+ auto_shards , _ = _auto_partition (
1078+ array_shape = array_shape ,
1079+ chunk_shape = chunk_shape ,
1080+ shard_shape = "auto" ,
1081+ item_size = dtype .itemsize ,
1082+ )
10871083 assert auto_shards == expected_shards
10881084
10891085
10901086def test_auto_partition_auto_shards_with_auto_chunks_should_be_close_to_1MiB () -> None :
10911087 """
10921088 Test that automatically picking a shard size and a chunk size gives roughly 1MiB chunks.
10931089 """
1094- with pytest .warns (
1095- ZarrUserWarning ,
1096- match = "Automatic shard shape inference is experimental and may change without notice." ,
1097- ):
1098- with zarr .config .set ({"array.target_shard_size_bytes" : 10_000_000 }):
1099- _ , chunk_shape = _auto_partition (
1100- array_shape = (10_000_000 ,),
1101- chunk_shape = "auto" ,
1102- shard_shape = "auto" ,
1103- item_size = 1 ,
1104- )
1090+ with zarr .config .set ({"array.target_shard_size_bytes" : 10_000_000 }):
1091+ _ , chunk_shape = _auto_partition (
1092+ array_shape = (10_000_000 ,),
1093+ chunk_shape = "auto" ,
1094+ shard_shape = "auto" ,
1095+ item_size = 1 ,
1096+ )
11051097 assert chunk_shape == (625000 ,)
11061098
11071099
0 commit comments