Skip to content

Commit c89ec7c

Browse files
committed
Add test for order warning in from_array
1 parent 4dac1fd commit c89ec7c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_array.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,15 @@ async def test_from_array_arraylike(
16271627
np.testing.assert_array_equal(result[...], np.full_like(src, fill_value))
16281628

16291629

1630+
def test_from_array_F_order() -> None:
1631+
arr = zarr.create_array(store={}, data=np.array([1]), order="F", zarr_format=2)
1632+
with pytest.warns(
1633+
UserWarning,
1634+
match="The existing order='F' of the source Zarr format 2 array will be ignored.",
1635+
):
1636+
zarr.from_array(store={}, data=arr, zarr_format=3)
1637+
1638+
16301639
async def test_orthogonal_set_total_slice() -> None:
16311640
"""Ensure that a whole chunk overwrite does not read chunks"""
16321641
store = MemoryStore()

0 commit comments

Comments
 (0)