Skip to content

Commit a022d77

Browse files
committed
Fix order with v3 arrays
1 parent 2738f2d commit a022d77

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/zarr/core/array.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ async def _create(
607607

608608
if order is not None:
609609
_warn_order_kwarg()
610+
config_parsed = replace(config_parsed, order=order)
610611

611612
result = await cls._create_v3(
612613
store_path,

tests/test_api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,12 @@ def test_array_order(zarr_format: ZarrFormat) -> None:
317317
def test_array_order_warns(order: MemoryOrder | None, zarr_format: ZarrFormat) -> None:
318318
with pytest.warns(RuntimeWarning, match="The `order` keyword argument .*"):
319319
arr = zarr.ones(shape=(2, 2), order=order, zarr_format=zarr_format)
320-
expected = order or zarr.config.get("array.order")
321-
assert arr.order == expected
320+
assert arr.order == order
322321

323322
vals = np.asarray(arr)
324-
if expected == "C":
323+
if order == "C":
325324
assert vals.flags.c_contiguous
326-
elif expected == "F":
325+
elif order == "F":
327326
assert vals.flags.f_contiguous
328327
else:
329328
raise AssertionError

0 commit comments

Comments
 (0)