Skip to content

Commit

Permalink
Fix combine tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Aug 14, 2019
1 parent 4f3c488 commit 7afbe51
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions xarray/core/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,11 @@ def _combine_1d(
dim=concat_dim,
data_vars=data_vars,
coords=coords,
compat=compat,
fill_value=fill_value,
join=join,
)
except ValueError as err:
if "encountered unexpected variable" in str(err):
if "Encountered unexpected variable" in str(err):
raise ValueError(
"These objects cannot be combined using only "
"xarray.combine_nested, instead either use "
Expand Down Expand Up @@ -825,7 +824,6 @@ def _old_auto_combine(
dim=dim,
data_vars=data_vars,
coords=coords,
compat=compat,
fill_value=fill_value,
join=join,
)
Expand All @@ -844,7 +842,7 @@ def _auto_concat(
coords="different",
fill_value=dtypes.NA,
join="outer",
compat="no_conflicts"
compat="equals",
):
if len(datasets) == 1 and dim is None:
# There is nothing more to combine, so kick out early.
Expand All @@ -871,6 +869,10 @@ def _auto_concat(
)
dim, = concat_dims
return concat(
datasets, dim=dim, data_vars=data_vars, coords=coords, fill_value=fill_value,
compat=compat
datasets,
dim=dim,
data_vars=data_vars,
coords=coords,
fill_value=fill_value,
compat=compat,
)

0 comments on commit 7afbe51

Please sign in to comment.