def _select_sigma(X):
 normalize = 1.349
 IQR = ((sap(X, 75) - sap(X, 25)) / normalize)
 return np.minimum(np.std(X, axis=0, ddof=1), IQR)

def _select_sigma ( X ) : normalize = 1.349 IQR = ( ( sap ( X , 75 ) - sap ( X , 25 ) ) / normalize ) return np . minimum ( np . std ( X , axis = 0 , ddof = 1 ) , IQR )
returns the smaller of std or normalized iqr(x) over axis 0 .