Pythonic way to replace list values with upper and lower bound (clamping, clipping, thresholding)?
Pythonic way to replace list values with upper and lower bound (clamping, clipping, thresholding)? Question: I want to replace outliners from a list. Therefore I define a upper and lower bound. Now every value above upper_bound and under lower_bound is replaced with the bound value. My approach was to do this in two steps using …