[issue28956] return list of modes for a multimodal distribution instead of raising a StatisticsError

2019-03-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm closing this issue in favour of Raymond's #35892, thank you to everyone even if your PRs didn't get used, I appreciate your efforts. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue28956] return list of modes for a multimodal distribution instead of raising a StatisticsError

2019-03-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: See the competing proposal and PR at https://bugs.python.org/issue35892 and https://github.com/python/cpython/pull/12089 -- nosy: +rhettinger ___ Python tracker

[issue28956] return list of modes for a multimodal distribution instead of raising a StatisticsError

2019-03-10 Thread Henry Chen
Henry Chen added the comment: Yes, the mode function could ALWAYS return a list, but that breaks backward compatibility, as does the currently proposed change. -- ___ Python tracker

[issue28956] return list of modes for a multimodal distribution instead of raising a StatisticsError

2019-03-10 Thread Henry Chen
Henry Chen added the comment: The problem remains that the function can return a number or a list for input that is a list of numbers. This means the user will need to handle both possibilities every time, which is a heavy burden for such a simple function. SciPy's mode function does return

[issue28956] return list of modes for a multimodal distribution instead of raising a StatisticsError

2018-02-18 Thread Srikanth Anantharam
Srikanth Anantharam added the comment: Please review the new PR with tests. I'll update the documentation if the PR is acceptable. -- title: return minimum of modes for a multimodal distribution instead of raising a StatisticsError -> return list of modes for a