On Fri, Nov 19, 2010 at 8:33 PM,  <josef.p...@gmail.com> 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
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to