[issue38181] some trable with max when np.nan is in the first of a list

2019-09-15 Thread 薛定谔的喵
New submission from 薛定谔的喵 <1147945...@qq.com>: max([5.0,np.nan]) >>> 5.0 max([np.nan,5.0]) >>> nan -- components: Tests messages: 352513 nosy: 1147945...@qq.com priority: normal severity: normal status: open title: some trable with max when np.nan is in the first of a list versions:

[issue38181] some trable with max when np.nan is in the first of a list

2019-09-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think it's more about how np.nan eq is implemented and not a bug in Python. I find this answer to be a good explanation https://stackoverflow.com/a/47788524/2610955 -- nosy: +xtreak ___ Python tracker

[issue38181] some trable with max when np.nan is in the first of a list

2019-09-16 Thread 薛定谔的喵
薛定谔的喵 <1147945...@qq.com> added the comment: thanks . -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue38181] some trable with max when np.nan is in the first of a list

2019-09-16 Thread Mark Dickinson
Mark Dickinson 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

[issue38181] some trable with max when np.nan is in the first of a list

2019-09-16 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python