Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/modelskill/comparison/_collection_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def taylor(
marker: str = "o",
marker_size: float = 6.0,
title: str = "Taylor diagram",
) -> Optional[Figure]:
) -> Figure:
"""Taylor diagram for model skill comparison.

Taylor diagram showing model std and correlation to observation
Expand Down Expand Up @@ -510,10 +510,6 @@ def taylor(
sk = skill_func(
metrics=[mtr._std_obs, mtr._std_mod, mtr.cc], # type: ignore
)
if sk is None:
# TODO when does this make sense?
return

# TODO reduce duplication of code in the ComparerPlotter/ComparerCollectionPlotter
df = sk.to_dataframe()
ref_std = 1.0 if normalize_std else df.iloc[0]["_std_obs"]
Expand Down
3 changes: 0 additions & 3 deletions src/modelskill/comparison/_comparer_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,6 @@ def taylor(
]

sk = cmp.skill(metrics=metrics)

if sk is None: # TODO
return
df = sk.to_dataframe().reset_index()
if "model" not in df.columns:
# doesn't make sense to make a taylor plot...
Expand Down