Sam
0
Q:

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]
0

New to Communities?

Join the community