[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets
Windson Yang
report at bugs.python.org
Sat Feb 16 08:36:18 EST 2019
Windson Yang <wiwindson at outlook.com> added the comment:
IMHO, we don't need to add the option. We can return the smallest value from the **table** instead of the code below.
if len(table) == 1:
return table[0][0]
[1] https://github.com/python/cpython/blob/master/Lib/statistics.py#L502
----------
nosy: +Windson Yang
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35892>
_______________________________________
More information about the Python-bugs-list
mailing list