dans NP Array Comment faire un élément comme 1 s'il dépasse le seuil

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