Wolfgang Maier added the comment: > >>> Counter(red=11, green=5, blue=4).normalize(100) # percentage > Counter(red=55, green=25, blue=20)
I like this example, where the normalize method of a Counter returns a new Counter, but I think the new Counter should always only have integer counts. More specifically, it should be the closest approximation of the original Counter that is possible with integers adding up to the argument to the method or, statistically speaking, it should represent the expected number of observations of each outcome for a given sample size. ---------- nosy: +wolma _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25478> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com