Skip to content

Commit c98e041

Browse files
committed
Make values float
1 parent 18cff2b commit c98e041

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ def quantiles(data, *, n=4, method='exclusive'):
12211221
# the interpolation formula which can be off by 1 ULP
12221222
# due to floating-point rounding
12231223
if (data[j - 1] == data[j]) or not delta:
1224-
interpolated = data[j - 1]
1224+
interpolated = float(data[j - 1])
12251225
else:
12261226
interpolated = (data[j - 1] * (n - delta) + data[j] * delta) / n
12271227
result.append(interpolated)

0 commit comments

Comments
 (0)