def max_distributions(cdf, m):
    """ Computes the CDF of `m` i.i.d. r.v.'s X distributed according to `cdf`.

    Parameters
    ----------
    cdf : NumPy array
        Cumulative distribution such that cdf[x] = Pr(X <= x).
    m : int
        Number of random variables X_1, ... X_m to take maximum of.

    Returns
    -------
    NumPy array of the same lenght as `cdf`.
        Cumulative distribution function of Z = max{X_1, X_2, ... X_m}.
    """
    return cdf ** m