how to get a nan element in array in python code example Example: how many nan in array python np.count_nonzero(~np.isnan(data))