Author wolma
Recipients josh.r, mark.dickinson, pitrou, rhettinger, veky, wolma
Date 2017-03-14.14:17:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>   >>> 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.
Date User Action Args
2017-03-14 14:17:33wolmasetrecipients: + wolma, rhettinger, mark.dickinson, pitrou, josh.r, veky
2017-03-14 14:17:33wolmasetmessageid: <>
2017-03-14 14:17:33wolmalinkissue25478 messages
2017-03-14 14:17:32wolmacreate