File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3989,12 +3989,12 @@ async def init_array(
39893989 chunks_out = chunk_shape_parsed
39903990 codecs_out = sub_codecs
39913991
3992- if order is not None :
3993- if config is None :
3994- config = {}
3995- if "order" not in config :
3996- config ["order" ] = order
3992+ if config is None :
3993+ config = {}
3994+ if order is not None and isinstance (config , dict ):
3995+ config ["order" ] = config .get ("order" , order )
39973996
3997+ print (config )
39983998 meta = AsyncArray ._create_metadata_v3 (
39993999 shape = shape_parsed ,
40004000 dtype = dtype_parsed ,
Original file line number Diff line number Diff line change @@ -1253,7 +1253,7 @@ def test_order(
12531253 Test that the arrays generated by array indexing have a memory order defined by the config order
12541254 value, and that for zarr v2 arrays, the ``order`` field in the array metadata is set correctly.
12551255 """
1256- config : ArrayConfigLike = {}
1256+ config : ArrayConfigLike | None = {}
12571257 if order is None :
12581258 config = {}
12591259 expected = zarr .config .get ("array.order" )
@@ -1275,6 +1275,7 @@ def test_order(
12751275 )
12761276 assert arr .order == expected
12771277 if zarr_format == 2 :
1278+ assert arr .metadata .zarr_format == 2
12781279 assert arr .metadata .order == expected
12791280
12801281 vals = np .asarray (arr )
You can’t perform that action at this time.
0 commit comments