When I use sigma clipping with an array where all values are the same, everything gets clipped. import scipy scipy.stats.sigmaclip([2,2,2])[0] This is especially problematic if there is one outlier and all other values are the same. import scipy scipy.stats.sigmaclip([2]*20+[3])[...