changed to npy_isnan since it is platform independent