count the number of non-nan elements in a numpy ndarray matrix `data`,np.count_nonzero(~np.isnan(data))