def natural2standard(np1, np2):
    """
    Converts natural parameterisation of a multivariate Gaussian to standard
    parameterisation.
    :param np1: Natural parameter 1, (*, D).
    :param np2: Natural parameter 2, (*, D).
    :return: mu, sigma, (*, D), (*, D).
    """
    assert np1.shape[-1] == np2.shape[-1], "np1 (*, D), np2 (*, D)."
    assert len(np1.shape) == len(np2.shape), "np1 (*, D), np2 (*, D)."

    sigma = (-2 * np2) ** (-0.5)
    mu = sigma ** 2 * np1

    return mu, sigma