-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on
Description
Addressing a Problem?
I think for at least some adjustments like the Scaling class there is no need to prevent a chunked main dimension. Since the mean works really well over a chunked dimension, I think this restriction is more harmful (memory) than helpful. Unless there is an advantage of having the dimension unchunked that I am not seeing.
Potential Solution
A simple _allow_chunked_main_dimension = False similar to _allow_diff_calendars could do the trick quite easily. Happy to implement this if you're happy with this.
Additional context
Reproducible example
import xarray as xr
from xsdba import Scaling
import numpy as np
time = xr.date_range('2000-01-01', '2010-12-31')
hist = xr.DataArray(np.random.rand(time.size), coords=dict(time=('time', time))).chunk(time=100)
ref = xr.DataArray(np.random.rand(time.size), coords=dict(time=('time', time)))
Scaling.train(ref, hist)Fails with on adjustment.py:93
ValueError: Multiple chunks along the main adjustment dimension time is not supported.
Contribution
- I would be willing/able to open a Pull Request to contribute this feature.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on