def log_pdf(self, X):
        assert(len(shape(X)) == 2)
        assert(shape(X)[1] == self.dimension)
        
        log_determinant_part = -sum(log(diag(self.L)))
        
        quadratic_parts = zeros(len(X))
        for i in range(len(X)):
            x = X[i] - self.mu
            
            # solve y=K^(-1)x = L^(-T)L^(-1)x
            y = solve_triangular(self.L, x.T, lower=True)
            y = solve_triangular(self.L.T, y, lower=False)
            quadratic_parts[i] = -0.5 * x.dot(y)
            
        const_part = -0.5 * len(self.L) * log(2 * pi)
        
        return const_part + log_determinant_part + quadratic_parts
dataset/ETHPy150Open karlnapf/kameleon-mcmc/kameleon_mcmc/distribution/Gaussian.py/Gaussian.log_pdf/original