Python numpy array periksa apakah semua nan
np.all(np.isnan(numpy_array))
Perro Fiel
np.all(np.isnan(numpy_array))
array_has_nan = np.isnan(array_sum)
a = a[~np.isnan(a)]