how to print nonzero elements of an array code example
Example: extract nonzero array elements python
numpy.nonzero(array)
#Return the indices of all the nonzero elements in the array
numpy.nonzero(array)
#Return the indices of all the nonzero elements in the array