Skip to content

Commit 12704b0

Browse files
committed
Add test for order warning in from_array
1 parent f8a624f commit 12704b0

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
@@ -1664,6 +1664,15 @@ async def test_from_array_arraylike(
16641664
np.testing.assert_array_equal(result[...], np.full_like(src, fill_value))
16651665

16661666

1667+
def test_from_array_F_order() -> None:
1668+
arr = zarr.create_array(store={}, data=np.array([1]), order="F", zarr_format=2)
1669+
with pytest.warns(
1670+
UserWarning,
1671+
match="The existing order='F' of the source Zarr format 2 array will be ignored.",
1672+
):
1673+
zarr.from_array(store={}, data=arr, zarr_format=3)
1674+
1675+
16671676
async def test_orthogonal_set_total_slice() -> None:
16681677
"""Ensure that a whole chunk overwrite does not read chunks"""
16691678
store = MemoryStore()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy