You need to check isnan() per element. NaN == NaN is false, so in() fails on NaN right now.
-- John On Dec 15, 2014, at 3:33 PM, Evan Pu <[email protected]> wrote: > 1 in [1,2,3] # returns true > > NaN in [NaN, 1.0, 2.0] # returns false > > how do I test if a float64 NaN is present in an array? I'm doing some > numerical computation and it can have some NaN error, I want to drop the > arrays that has NaN.
