def __init__(self, K, pi=None, psi=None, mu=None, Sigma=None):
        """
        Create a PGMultinomial distribution with mean and covariance for psi.

        :param K:       Dimensionality of the multinomial distribution
        :param pi:      Multinomial probability vector (must sum to 1)
        :param psi:     Transformed multinomial probability vector
        :param mu:      Mean of \psi
        :param Sigma:   Covariance of \psi
        """
        assert isinstance(K, int) and K >= 2, "K must be an integer >= 2"
        self.K = K

        assert pi is not None or psi is not None or None not in (mu, Sigma), \
            "pi, psi, or (mu and Sigma) must be specified"

        if pi is not None:
            assert isinstance(pi, np.ndarray) and \
                   pi.shape == (K,) and \
                   np.allclose(pi.sum(), 1.0), \
                "Pi must be a normalized length-K vector"
            self.pi = pi

        if psi is not None:
            assert isinstance(psi, np.ndarray) and \
                   psi.shape == (K-1,), \
                "Psi must be a length-K vector of reals"
            self.psi = psi

        if None not in (mu, Sigma):
            assert isinstance(mu, np.ndarray) and mu.shape == (K,), \
                "Mu must be a length-K vector"

            assert isinstance(Sigma, np.ndarray) and Sigma.shape == (K,K), \
                "Sigma must be a KxK Covariance matrix"
            self.mu = mu
            self.Sigma = Sigma
            self.Lambda = np.linalg.inv(Sigma)

            # If psi and pi have not been given, sample from the prior
            if psi is None and pi is None:
                self.psi = np.random.multivariate_normal(self.mu, self.Sigma)

        # Initialize Polya-gamma augmentation variables
        self.ppgs   = initialize_polya_gamma_samplers()
        self.omega = np.ones(self.K)

        # Initialize the space for the transformed psi variables, rho
        self.rho = np.zeros(self.K)
dataset/ETHPy150Open HIPS/pgmult/pgmult/distributions.py/PGLogisticNormalMultinomial.__init__/original