check for nan values on probabilistic exposure

This commit is contained in:
Luis Aleixo 2022-12-15 16:12:30 +00:00
parent d3a7fa5f2f
commit 87318a72c8

View file

@ -223,6 +223,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%"
else:
return "{:0.1f}%".format(percentage)