def fmt_pvalue()

in analysis/render.py [0:0]


def fmt_pvalue(x: np.float64) -> str:
    """Format a p-value"""
    if x <= 0:
        return "≈0"

    spec = ".0e" if x < 0.001 else ".3f"
    return format(x, spec).replace("e-0", "e-")