Message336674
| Author | steven.daprano |
|---|---|
| Recipients | Windson Yang, cheryl.sabella, francismb, rhettinger, steven.daprano |
| Date | 2019-02-26.14:19:22 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <20190226141916.GZ4465@ando.pearwood.info> |
| In-reply-to | <1551146286.98.0.91337972212.issue35892@roundup.psfhosted.org> |
| Content | |
|---|---|
> 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'. |
|
| History | |||
|---|---|---|---|
| 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 | |