File tree 2 files changed +11
-11
lines changed
2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 17
17
from_array ,
18
18
get_array_metadata ,
19
19
)
20
- from zarr .core .array_spec import ArrayConfig , ArrayConfigLike , ArrayConfigParams
20
+ from zarr .core .array_spec import ArrayConfigLike , ArrayConfigParams
21
21
from zarr .core .buffer import NDArrayLike
22
22
from zarr .core .common import (
23
23
JSON ,
@@ -1039,15 +1039,6 @@ async def create(
1039
1039
)
1040
1040
warnings .warn (UserWarning (msg ), stacklevel = 1 )
1041
1041
config_dict ["write_empty_chunks" ] = write_empty_chunks
1042
- if order is not None and config is not None :
1043
- msg = (
1044
- "Both order and config keyword arguments are set. "
1045
- "This is redundant. When both are set, order will be ignored and "
1046
- "config will be used."
1047
- )
1048
- warnings .warn (UserWarning (msg ), stacklevel = 1 )
1049
-
1050
- config_parsed = ArrayConfig .from_dict (config_dict )
1051
1042
1052
1043
return await AsyncArray ._create (
1053
1044
store_path ,
@@ -1066,7 +1057,7 @@ async def create(
1066
1057
codecs = codecs ,
1067
1058
dimension_names = dimension_names ,
1068
1059
attributes = attributes ,
1069
- config = config_parsed ,
1060
+ config = config ,
1070
1061
** kwargs ,
1071
1062
)
1072
1063
Original file line number Diff line number Diff line change @@ -584,6 +584,15 @@ async def _create(
584
584
_chunks = normalize_chunks (chunks , shape , dtype_parsed .itemsize )
585
585
else :
586
586
_chunks = normalize_chunks (chunk_shape , shape , dtype_parsed .itemsize )
587
+
588
+ if order is not None and config is not None :
589
+ msg = (
590
+ "Both order and config keyword arguments are set. "
591
+ "This is redundant. When both are set, order will be ignored and "
592
+ "config will be used."
593
+ )
594
+ warnings .warn (UserWarning (msg ), stacklevel = 1 )
595
+
587
596
config_parsed = parse_array_config (config )
588
597
589
598
result : AsyncArray [ArrayV3Metadata ] | AsyncArray [ArrayV2Metadata ]
You can’t perform that action at this time.
0 commit comments