Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support missing chunks in ConsolidateChunks

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start from the ConsolidateChunks entry point and reproduce the provided SplitChunks example with one input removed. Compare the desired behavior with xarray.merge; done means missing chunks are filled with NaN instead of raising the current ValueError.

Written by the indexing model from the issue text.

Description

This currently raises an error, but isn't always a programming error:

import xarray
import xarray_beam as xbeam
import numpy as np

ds = xarray.Dataset({"foo": (('x', 'y'), np.zeros((4, 4)))})
key = xbeam.Key({'x': 0, 'y': 0})

([(key, ds)] | xbeam.SplitChunks({'x': 2, 'y': 2}))[:-1] | xbeam.ConsolidateChunks({'x': -1, 'y': -1})
# ValueError: some expected chunks are missing for vars=None shape: [2, 2]
# len(inputs): 3 [while running 'ConsolidateChunks/Consolidate']

It would be nice if we supported missing chunks by filling in values with NaN, like xarray.merge.

Dominant language
Python
Stars
170
Forks
15
Avg merge
18h 27m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/xarray-beam

All issues in google/xarray-beam

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.