On Fri, Nov 19, 2010 at 7:51 PM,  <josef.p...@gmail.com> wrote:
> On Fri, Nov 19, 2010 at 10:42 PM, Keith Goodman <kwgood...@gmail.com> wrote:
>> It basically loops through the data and does:
>>
>> allnan = 1
>> ai = ai[i,k]
>> if ai > amax:
>>    amax = ai
>>    allnan = 0
>
> does this give you the correct answer?
>
>>>> 1>np.nan
> False

Yes -- notice he does the comparison the other way, and

>>> 1 < np.nan
False

(All comparisons involving NaN return false, including, famously, NaN
== NaN, which is why we need np.isnan.)

-- Nathaniel
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to