code: def _log_multivariate_normal_density_full(X, means, covars, min_covar=1.e-7):
      
      n_samples, n_dim = X.shape
      nmix = len(means)
      log_prob = np.empty((n_samples, nmix))
      for c, (mu, cv) in enumerate(zip(means, covars)):
          try:
              cv_chol = linalg.cholesky(cv, lower=True)
          except linalg.LinAlgError:
              # The model is most probably stuck in a component with too
              # few observations, we need to reinitialize this components
              try:
                  cv_chol = linalg.cholesky(cv + min_covar * np.eye(n_dim),
                                            lower=True)
              except linalg.LinAlgError:
                  raise ValueError("'covars' must be symmetric, "
                                   "positive-definite")
  
          cv_log_det = 2 * np.sum(np.log(np.diagonal(cv_chol)))
          cv_sol = linalg.solve_triangular(cv_chol, (X - mu).T, lower=True).T
          log_prob[:, c] = - .5 * (np.sum(cv_sol ** 2, axis=1) +
                                   n_dim * np.log(2 * np.pi) + cv_log_det)
  
      return log_prob
docs: Log probability for full covariance matrices.