code: def __init__(self, eigendecomposition):
      eigenvalues, eigenvectors = eigendecomposition
      eigenvalues = self._validate_vector(eigenvalues, "eigenvalues")
      eigenvectors = self._validate_matrix(eigenvectors, "eigenvectors")
      message = (
          "The shapes of `eigenvalues` and `eigenvectors` "
          "must be compatible."
      )
      try:
          eigenvalues = np.expand_dims(eigenvalues, -2)
          eigenvectors, eigenvalues = np.broadcast_arrays(
              eigenvectors, eigenvalues
          )
          eigenvalues = eigenvalues[..., 0, :]
      except ValueError:
          raise ValueError(message)
  
      i_zero = eigenvalues <= 0
      positive_eigenvalues = np.array(eigenvalues, dtype=np.float64)
  
      positive_eigenvalues[i_zero] = 1  # ones don't affect determinant
      self._log_pdet = np.sum(np.log(positive_eigenvalues), axis=-1)
  
      psuedo_reciprocals = 1 / np.sqrt(positive_eigenvalues)
      psuedo_reciprocals[i_zero] = 0
  
      self._LP = eigenvectors * psuedo_reciprocals
      self._LA = eigenvectors * np.sqrt(eigenvalues)
      self._rank = positive_eigenvalues.shape[-1] - i_zero.sum(axis=-1)
      self._w = eigenvalues
      self._v = eigenvectors
      self._shape = eigenvectors.shape
      self._null_basis = eigenvectors * i_zero
      # This is only used for `_support_mask`, not to decide whether
      # the covariance is singular or not.
      self._eps = _multivariate._eigvalsh_to_eps(eigenvalues) * 10**3
      self._allow_singular = True
  
imports: from functools import cached_property
  import numpy
  from scipy import linalg
  from scipy.stats import _multivariate
label_desc: Use image node_id 1 to create a new CovViaEigendecomposition object from inherited base classes: Covariance with example: obj = CovViaEigendecomposition(eigendecomposition)