Message333135
I believe that the current behavior of `statistics.median[|_low|_high\]` is simply broken. It relies on the particular behavior of Python sorting, which only utilizes `.__lt__()` between objects, and hence does not require a total order.
I can think of absolutely no way to characterize these as reasonable results:
Python 3.7.1 | packaged by conda-forge | (default, Nov 13 2018, 09:50:42)
>>> statistics.median([9, 9, 9, nan, 1, 2, 3, 4, 5])
1
>>> statistics.median([9, 9, 9, nan, 1, 2, 3, 4])
nan |
|
Date |
User |
Action |
Args |
2019-01-07 03:57:43 | DavidMertz | set | recipients:
+ DavidMertz, mark.dickinson, eric.smith, steven.daprano, maheshwark97, dcasmr |
2019-01-07 03:57:41 | DavidMertz | set | messageid: <1546833461.88.0.753365697707.issue33084@roundup.psfhosted.org> |
2019-01-07 03:57:41 | DavidMertz | link | issue33084 messages |
2019-01-07 03:57:41 | DavidMertz | create | |
|