diff options
author | stoffu <stoffu@protonmail.ch> | 2019-04-09 19:13:55 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2019-04-09 19:40:57 +0900 |
commit | 467f4c7ed303ca56bb0545716791c84fe11e3ce6 (patch) | |
tree | a38dba2ac0b01245a448565df768c8b26c05e549 /tests | |
parent | tests/block_weight: remove unused MULTIPLIER_SMALL (diff) | |
download | monero-467f4c7ed303ca56bb0545716791c84fe11e3ce6.tar.xz |
tests/block_weight: use integer division when computing median
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/block_weight/block_weight.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/block_weight/block_weight.py b/tests/block_weight/block_weight.py index ae75844e2..b23da3d77 100755 --- a/tests/block_weight/block_weight.py +++ b/tests/block_weight/block_weight.py @@ -23,9 +23,9 @@ def get_median(vec): #temp = vec temp = sorted(vec) if len(temp) % 2 == 1: - return temp[len(temp)/2] + return temp[len(temp)//2] else: - return int((temp[len(temp)/2]+temp[len(temp)/2-1])/2) + return int((temp[len(temp)//2]+temp[len(temp)//2-1])//2) def LCG(): global lcg_seed |