On Fri, Nov 19, 2010 at 8:33 PM, <[email protected]> wrote: >>>> -np.inf>-np.inf > False > > If the only value is -np.inf, you will return nan, I guess. > >>>> np.nanmax([-np.inf, np.nan]) > -inf
That's a great corner case. Thanks, Josef. This looks like it would fix it:
change
if ai > amax:
amax = ai
to
if ai >= amax:
amax = ai
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion
