Support missing chunks in ConsolidateChunks
Open
- Dominant language
- Python
- Stars
- 170
- Forks
- 15
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 1
Description
This currently raises an error, but isn't always a programming error:
```python
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`.
Contributor guide
Assessment
This issue has not been assessed yet.