Skip to content

Commit ca22bd6

Browse files
committed
Update docs
1 parent 2aa143f commit ca22bd6

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

doc/whats-new.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@ v2026.05.0 (unreleased)
1414
New Features
1515
~~~~~~~~~~~~
1616

17-
- Adds a new option ``chunks="preserve"`` when opening a dataset. This option
18-
guarantees that chunks in xarray match on-disk chunks or multiples of them.
19-
No chunk splitting allowed. (:pull:`11060`).
17+
- Change behavior of ``chunks="auto"`` to guarantee that chunks in xarray
18+
match on-disk chunks or multiples of them. No automatic chunk splitting allowed.
19+
(:pull:`11060`).
2020
By `Julia Signell <https://github.com/jsignell>`_
21-
- Added ``inherit='all_coords'`` option to :py:meth:`DataTree.to_dataset` to inherit
22-
all parent coordinates, not just indexed ones (:issue:`10812`, :pull:`11230`).
23-
By `Alfonso Ladino <https://github.com/aladinor>`_.
2421

2522
Breaking Changes
2623
~~~~~~~~~~~~~~~~

xarray/namedarray/parallelcompat.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -797,18 +797,18 @@ def preserve_chunks(
797797
"""Quickly determine optimal chunks close to target size but never splitting
798798
previous_chunks.
799799
800-
This takes in a chunks argument potentially containing ``"preserve"`` for several
801-
dimensions. This function replaces ``"preserve"`` with concrete dimension sizes that
800+
This takes in a chunks argument potentially containing ``"auto"`` for several
801+
dimensions. This function replaces ``"auto"`` with concrete dimension sizes that
802802
try to get chunks to be close to certain size in bytes, provided by the ``target=``
803-
keyword. Any dimensions marked as ``"preserve"`` will potentially be multiplied
803+
keyword. Any dimensions marked as ``"auto"`` will potentially be multiplied
804804
by some factor to get close to the byte target, while never splitting
805805
``previous_chunks``. If chunks are non-uniform along a particular dimension
806806
then that dimension will always use exactly ``previous_chunks``.
807807
808808
Examples
809809
--------
810810
>>> ChunkManagerEntrypoint.preserve_chunks(
811-
... chunks=("preserve", "preserve", "preserve"),
811+
... chunks=("auto", "auto", "auto"),
812812
... shape=(1280, 1280, 20),
813813
... target=500 * 1024,
814814
... typesize=8,
@@ -817,7 +817,7 @@ def preserve_chunks(
817817
(128, 128, 2)
818818
819819
>>> ChunkManagerEntrypoint.preserve_chunks(
820-
... chunks=("preserve", "preserve", 1),
820+
... chunks=("auto", "auto", 1),
821821
... shape=(1280, 1280, 20),
822822
... target=1 * 1024 * 1024,
823823
... typesize=8,
@@ -826,7 +826,7 @@ def preserve_chunks(
826826
(128, 1024, 1)
827827
828828
>>> ChunkManagerEntrypoint.preserve_chunks(
829-
... chunks=("preserve", "preserve", 1),
829+
... chunks=("auto", "auto", 1),
830830
... shape=(1280, 1280, 20),
831831
... target=1 * 1024 * 1024,
832832
... typesize=8,
@@ -838,7 +838,7 @@ def preserve_chunks(
838838
----------
839839
chunks: tuple[int | str | tuple[int], ...]
840840
A tuple of either dimensions or tuples of explicit chunk dimensions
841-
Some entries should be "preserve".
841+
Some entries should be "auto".
842842
shape: tuple[int]
843843
The shape of the array
844844
target: int

0 commit comments

Comments
 (0)