Skip to content

Commit a106569

Browse files
committed
Small improvement
1 parent 9b5e4cc commit a106569

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

xarray/core/parallel.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,8 @@ def subset_dataset_to_block(
522522
expected["data_vars"] = set(template.data_vars.keys()) # type: ignore[assignment]
523523
expected["coords"] = set(template.coords.keys()) # type: ignore[assignment]
524524
expected["indexes"] = {
525-
dim: coordinates.xindexes[dim][
526-
_get_chunk_slicer(dim, chunk_index, output_chunk_bounds)
527-
]
528-
for dim in coordinates.xindexes
525+
dim: index[_get_chunk_slicer(dim, chunk_index, output_chunk_bounds)]
526+
for dim, index in coordinates.xindexes.items()
529527
}
530528

531529
from_wrapper = (gname,) + chunk_tuple

0 commit comments

Comments
 (0)