Skip to content

Commit

Permalink
Rewrite test explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
aulemahal committed Aug 7, 2024
1 parent be949c1 commit 6eaaf39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_sdba/test_adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def test_mon_U(self, mon_series, series, mon_triangular, kind, name, random):
def test_add_dims(self, use_dask, open_dataset):
with set_options(sdba_encode_cf=use_dask):
if use_dask:
chunks = {"location": 1}
chunks = {"location": -1}
else:
chunks = None

Expand All @@ -571,9 +571,9 @@ def test_add_dims(self, use_dask, open_dataset):
.tasmax
)
ref = convert_units_to(ref, "K")
ref = ref.isel(location=1, drop=True).expand_dims(location=["Amos"])
# The idea is to have the same ref on all locations
ref, hist = xr.align(ref, hist, join="outer")
# The idea is to have ref defined only over 1 location
# But sdba needs the same dimensions on ref and hist for Grouping with add_dims
ref = ref.where(ref.location == "Amos")

# With add_dims, "does it run" test
group = Grouper("time.dayofyear", window=5, add_dims=["location"])
Expand Down

0 comments on commit 6eaaf39

Please sign in to comment.