Skip to content

Commit

Permalink
Fix TypeError when adjusting with preloaded training dataset
Browse files Browse the repository at this point in the history
Returns an empty list if a reduced dimension is not in the dataset chunks
  • Loading branch information
saschahofmann authored Mar 13, 2024
1 parent fe82841 commit b50a54d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xclim/sdba/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def _map_blocks(ds, **kwargs): # noqa: C901
{
dim: chunks.get(dim)
for dim in reduced_dims
if len(chunks.get(dim)) > 1
if len(chunks.get(dim, [])) > 1
}
)
if badchunks:
Expand Down

0 comments on commit b50a54d

Please sign in to comment.