w tablicy NP, jak zrobić element jako 1, jeśli przekroczy próg

a = [0 if a_ > thresh else a_ for a_ in a]
Famous Flamingo