mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-24 09:20:04 -07:00
tests/block_weight: use integer division when computing median
This commit is contained in:
parent
815d08dc5f
commit
467f4c7ed3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user