mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
tests/block_weight: use integer division when computing median
This commit is contained in:
parent
815d08dc5f
commit
467f4c7ed3
1 changed files with 2 additions and 2 deletions
|
@ -23,9 +23,9 @@ def get_median(vec):
|
||||||
#temp = vec
|
#temp = vec
|
||||||
temp = sorted(vec)
|
temp = sorted(vec)
|
||||||
if len(temp) % 2 == 1:
|
if len(temp) % 2 == 1:
|
||||||
return temp[len(temp)/2]
|
return temp[len(temp)//2]
|
||||||
else:
|
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():
|
def LCG():
|
||||||
global lcg_seed
|
global lcg_seed
|
||||||
|
|
Loading…
Reference in a new issue