if we have array of number that bigger then zero how can we know which number was replaced by zero pythob code example
Example: in np array how to make element as 1 if it exceeds the threshold
a = [0 if a_ > thresh else a_ for a_ in a]
a = [0 if a_ > thresh else a_ for a_ in a]