Message336674
> Proposed spec:
> '''
> Modify the API statistics.mode to handle multimodal cases so that the
> first mode encountered is the one returned. If the input is empty,
> raise a StatisticsError.
Are you happy guaranteeing that it will always be the first mode
encountered? I'm not happy about it, but I'll follow you lead on this
one.
> TestCases:
> mode([]) --> StatisticsError
> mode('aabbbcc') --> 'c'
That should be 'b'.
> mode(iter('aabbbcc')) --> 'c'
And again 'b'.
> mode('eeffddddggaaaa') --> 'a'
If it is first encountered, that should be 'd'. |
|
Date |
User |
Action |
Args |
2019-02-26 14:19:22 | steven.daprano | set | recipients:
+ steven.daprano, rhettinger, francismb, cheryl.sabella, Windson Yang |
2019-02-26 14:19:22 | steven.daprano | link | issue35892 messages |
2019-02-26 14:19:22 | steven.daprano | create | |
|