def tukey_pvalues(std_range, nm, df):
    #corrected but very slow with warnings about integration
    from statsmodels.sandbox.distributions.multivariate import mvstdtprob
    #nm = len(std_range)
    contr = contrast_allpairs(nm)
    corr = np.dot(contr, contr.T)/2.
    tstat = std_range / np.sqrt(2) * np.ones(corr.shape[0]) #need len of all pairs
    return multicontrast_pvalues(tstat, corr, df=df)
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/stats/multicomp.py/tukey_pvalues/original