Change check of if there's only one unique value in scores.

This commit is contained in:
Raphael Mitsch 2022-11-11 11:33:50 +01:00
parent 5de02dc903
commit 34c6c3b7c9

View File

@ -193,7 +193,7 @@ def find_threshold(
best_threshold = max(scores.keys(), key=(lambda key: scores[key])) best_threshold = max(scores.keys(), key=(lambda key: scores[key]))
# If all scores are identical, emit warning. # If all scores are identical, emit warning.
if all([score == scores[thresholds[0]] for score in scores.values()]): if len(set(scores.values())) == 1:
wasabi.msg.warn( wasabi.msg.warn(
title="All scores are identical. Verify that all settings are correct.", title="All scores are identical. Verify that all settings are correct.",
text="" text=""