There is a function in numpy named np.isnan(A) to check whether A is nan. In my case, A could be a number with some unknown value or np.nan returne
np.isnan(A)
np.nan