Skip to content

Commit

Permalink
add unify_chunks() to merge_partitions()
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer authored Aug 14, 2024
1 parent 42f10ab commit 57b4b7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xugrid/ugrid/partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ def merge_partitions(partitions, merge_ugrid_chunks: bool = True):
)
merged.update(merged_selection)

# prevent inconsistent chunks, for which merged.chunks will give a ValueError
merged = merged.unify_chunks()

# Merge chunks along the UGRID dimensions.
if merged.chunks and merge_ugrid_chunks:
chunks = dict(merged.chunks)
Expand Down

0 comments on commit 57b4b7b

Please sign in to comment.