set with non-zero value python 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