-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make sure acc_round returns integers
- Loading branch information
1 parent
87fa65b
commit 6fd2d3c
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
''' | ||
|
||
__author__ = "Franc[e]sco <[email protected]>" | ||
__version__ = "1.0.9" | ||
__version__ = "1.0.10" | ||
|
||
import sys | ||
import math | ||
|
@@ -961,6 +961,8 @@ def acc_round(acc_percent, nobjects, misses): | |
((acc_percent * 0.01 - 1.0) * nobjects + misses) * 0.5 | ||
) | ||
|
||
n100 = int(n100) | ||
|
||
if n100 > nobjects - misses: | ||
# acc lower than all 100s, use 50s | ||
n100 = 0 | ||
|
@@ -971,6 +973,7 @@ def acc_round(acc_percent, nobjects, misses): | |
) * 0.5 | ||
) | ||
|
||
n50 = int(n50) | ||
n50 = min(max300, n50) | ||
|
||
else: | ||
|