Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 24, 2025
1 parent bd098a7 commit 83a7e1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion training/src/anemoi/training/diagnostics/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,9 @@ def error_plot_in_degrees(array1: np.ndarray, array2: np.ndarray) -> np.ndarray:
combined_error = np.concatenate(((pred - input_), (truth - input_)))
norm = Normalize(vmin=np.nanmin(combined_data), vmax=np.nanmax(combined_data))
norm_error = TwoSlopeNorm(
vmin=min(np.nanmin(combined_error), -1e-5), vcenter=0.0, vmax=max(np.nanmax(combined_error), 1e-5),
vmin=min(np.nanmin(combined_error), -1e-5),
vcenter=0.0,
vmax=max(np.nanmax(combined_error), 1e-5),
)
single_plot(fig, ax[1], lon, lat, truth, norm=norm, title=f"{vname} target", datashader=datashader)
single_plot(fig, ax[2], lon, lat, pred, norm=norm, title=f"{vname} pred", datashader=datashader)
Expand Down

0 comments on commit 83a7e1a

Please sign in to comment.