Forcing NANs to the end is not the right solution. Consider the median of [NAN, 2, 3, 4, 5]. If you force the NAN to remain at the start, the median is 3. If you force the NAN to the end of the list, the median is 4. Your choice to force NANs to the end is equivalent to introducing a bias towards larger values.
-- Steven _______________________________________________ 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/PUBDGRYYCTHMXLULM2R564JRXPSYMBFY/ Code of Conduct: http://python.org/psf/codeofconduct/