How can I check for NaN values?
Return
True
if x is a NaN (not a number), andFalse
otherwise.
>>> import math>>> x = float('nan')>>> math.isnan(x)True
Return
True
if x is a NaN (not a number), andFalse
otherwise.
>>> import math>>> x = float('nan')>>> math.isnan(x)True