Mark Dickinson <dicki...@gmail.com> added the comment:
Right, `max` can only give meaningful results when presented with elements that belong to a totally-ordered collection. Unfortunately, floats-including-nan is not such a collection (though floats-excluding-nan *is*, provided we ignore wrinkles with positive and negative zero). Here's the source of the issue: Python 3.7.4 (default, Sep 7 2019, 19:52:29) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> 5.0 < np.nan False >>> np.nan < 5.0 False ---------- nosy: +mark.dickinson resolution: third party -> stage: resolved -> status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38181> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com