make int casting explicit

This commit is contained in:
Jeremy Carbaugh 2012-03-11 22:19:15 -07:00
parent fad10e5a98
commit de72f7755c

View File

@ -30,10 +30,10 @@ def _median(values):
if count % 2 == 1:
# odd number of items, return middle value
return float(values[count / 2])
return float(values[int(count / 2)])
else:
# 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
def _stddev(values, population=False):