Skip to content

Commit 13a65a5

Browse files
committed
Fix order with V3 arrays
1 parent cc5ee3f commit 13a65a5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/zarr/core/array.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3989,6 +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
3997+
39923998
meta = AsyncArray._create_metadata_v3(
39933999
shape=shape_parsed,
39944000
dtype=dtype_parsed,

tests/test_array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,9 +1273,9 @@ def test_order(
12731273
order=order,
12741274
config=config,
12751275
)
1276+
assert arr.order == expected
12761277
if zarr_format == 2:
12771278
assert arr.metadata.order == expected
1278-
assert arr.order == expected
12791279

12801280
vals = np.asarray(arr)
12811281
if expected == "C":

0 commit comments

Comments
 (0)