Select non-zero values with the nonzero() function: print("Non zero", np.nonzero(a)) This prints all the non-zero values of the array: Non zero (array([1, ...
確定! 回上一頁