Skip to content

Commit

Permalink
fixed bug on displaying inf. probability > 99.9%
Browse files Browse the repository at this point in the history
  • Loading branch information
lrdossan committed Mar 11, 2024
1 parent f7757db commit 62024a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caimira/apps/calculator/report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 62024a2

Please sign in to comment.