make int casting explicit
This commit is contained in:
parent
fad10e5a98
commit
de72f7755c
@ -30,10 +30,10 @@ def _median(values):
|
|||||||
|
|
||||||
if count % 2 == 1:
|
if count % 2 == 1:
|
||||||
# odd number of items, return middle value
|
# odd number of items, return middle value
|
||||||
return float(values[count / 2])
|
return float(values[int(count / 2)])
|
||||||
else:
|
else:
|
||||||
# even number of items, return average of middle two items
|
# even number of items, return average of middle two items
|
||||||
mid = count / 2
|
mid = int(count / 2)
|
||||||
return sum(values[mid - 1:mid + 1]) / 2.0
|
return sum(values[mid - 1:mid + 1]) / 2.0
|
||||||
|
|
||||||
def _stddev(values, population=False):
|
def _stddev(values, population=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user