[issue35698] Division by 2 in statistics.median

STINNER Victor report at bugs.python.org
Wed Jan 9 06:58:33 EST 2019


STINNER Victor <vstinner at redhat.com> added the comment:

> When len(data) is odd, median returns the average of the two middle values.

I'm not sure that I understand your issue. Do you consider that it's a bug? It's part of the definition of the median function, no?
https://en.wikipedia.org/wiki/Median#Finite_set_of_numbers

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35698>
_______________________________________


More information about the Python-bugs-list mailing list