fixed bug on displaying inf. probability > 99.9%

This commit is contained in:
Luis Aleixo 2024-03-11 13:45:41 +01:00
parent 5e9d6501ae
commit 24b3eba422

View file

@ -346,8 +346,8 @@ def non_zero_percentage(percentage: int) -> str:
return "<0.01%"
elif percentage < 1:
return "{:0.2f}%".format(percentage)
elif np.isnan(percentage):
return "99.9%"
elif percentage > 99.9 or np.isnan(percentage):
return ">99.9%"
else:
return "{:0.1f}%".format(percentage)