def bonferroni_correction(pval, alpha=0.05):
    """P-value correction with Bonferroni method

    Parameters
    ----------
    pval : array_like
        set of p-values of the individual tests.
    alpha : float
        error rate

    Returns
    -------
    reject : array, bool
        True if a hypothesis is rejected, False if not
    pval_corrected : array
        pvalues adjusted for multiple hypothesis testing to limit FDR

    """
    pval = np.asarray(pval)
    pval_corrected = pval * float(pval.size)
    reject = pval_corrected < alpha
    return reject, pval_corrected
dataset/ETHPy150Open mne-tools/mne-python/mne/stats/multi_comp.py/bonferroni_correction/original