float

using float('nan') to represent missing values - safe?

Python 3.1 I am doing some calculations on a data that has missing values. Any calculation that involves a missing value should result in a missing value. I am thinking of using float('nan') to represent missing values. Is it safe? At the end I'll just check def is_missing(x): return x!=x # I hope it's safe to use to check for NaN ...