Wyodrębnij Python bezzerowych elementów macierzy

numpy.nonzero(array)
#Return the indices of all the nonzero elements in the array
MitchAloha