On 12/30/19 12:18 PM, Christopher Barker wrote:
Steven D'Aprano <st...@pearwood.info <mailto:st...@pearwood.info>> wrote:
Can you explain the scenario where somebody using median will
want
negative NANs to sort to the beginning, below -INF, and
positive NANs to
sort to the end, above +INF?
No, and I don’t think anyone really wants that. I think it was
proposed as a possible improvement on non-deterministic results,
and/or a way to address this issue by only changing how the sorting is
done.
Whether IEEE total order is useful in some other contexts is a totally
separate question.
-CHB
I would say that the only reason to use that in median is it at least
produces results that are consistent and not dependent on input data
order, and if we assume NaN results are rare close to the actual median
(what ever that really means) of the data.
It converts Garbage In, Crazy Garbage Out to Garbage In, Somewhat
Garbage Out (maybe its abstract art?).
--
Richard Damon
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/IYKTX52RE4GFLULEUFXVOHWSBLT6KRRB/
Code of Conduct: http://python.org/psf/codeofconduct/