Skip to content

Commit

Permalink
Fix .shape on dataset in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-andersson committed Oct 20, 2024
1 parent 7678bc3 commit dcdab7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ def test_forecasting_model_predict_return_valid_times(self):
# Check we can compute errors using the valid time coord ('time')
errors = pred_var["mean"] - self.da.sel(time=pred_var.time)
assert errors.dims == ("lead_time", "init_time", "x1", "x2")
assert errors.shape == pred_var.shape
assert errors.shape == pred_var["mean"].shape
elif isinstance(pred_var, pd.DataFrame):
# Makes coordinate checking easier by avoiding repeat values
pred_var = pred_var.to_xarray().isel(x1=0, x2=0)
Expand Down

0 comments on commit dcdab7a

Please sign in to comment.