def _max_stat(X, X2, perms, dof_scaling):
 n_samples = len(X)
 mus = (np.dot(perms, X) / float(n_samples))
 stds = (np.sqrt((X2[None, :] - (mus ** 2))) * dof_scaling)
 max_abs = np.max((np.abs(mus) / (stds / sqrt(n_samples))), axis=1)
 return max_abs

def _max_stat ( X , X2 , perms , dof_scaling ) : n_samples = len ( X ) mus = ( np . dot ( perms , X ) / float ( n_samples ) ) stds = ( np . sqrt ( ( X2 [ None , : ] - ( mus ** 2 ) ) ) * dof_scaling ) max_abs = np . max ( ( np . abs ( mus ) / ( stds / sqrt ( n_samples ) ) ) , axis = 1 ) return max_abs
aux function for permutation_t_test .