[issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too)

Raymond Hettinger report at bugs.python.org
Sat Nov 20 11:05:47 EST 2021


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Accepting the suggestion for multimode() to use max() instead of a full sort.  This is a nice improvement.  Thank you.

Leaving mode() as-is.  The existing code is cleaner and does its work in a single pass over the counter.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list