class_docstr: Compute coordinated functions of a symmetric positive semidefinite matrix.
  
  This class addresses two issues.  Firstly it allows the pseudoinverse,
  the logarithm of the pseudo-determinant, and the rank of the matrix
  to be computed using one call to eigh instead of three.
  Secondly it allows these functions to be computed in a way
  that gives mutually compatible results.
  All of the functions are computed with a common understanding as to
  which of the eigenvalues are to be considered negligibly small.
  The functions are designed to coordinate with scipy.linalg.pinvh()
  but not necessarily with np.linalg.det() or with np.linalg.matrix_rank().
  
  Parameters
  ----------
  M : array_like
      Symmetric positive semidefinite matrix (2-D).
  cond, rcond : float, optional
      Cutoff for small eigenvalues.
      Singular values smaller than rcond * largest_eigenvalue are
      considered zero.
      If None or -1, suitable machine precision is used.
  lower : bool, optional
      Whether the pertinent array data is taken from the lower
      or upper triangle of M. (Default: lower)
  check_finite : bool, optional
      Whether to check that the input matrices contain only finite
      numbers. Disabling may give a performance gain, but may result
      in problems (crashes, non-termination) if the inputs do contain
      infinities or NaNs.
  allow_singular : bool, optional
      Whether to allow a singular matrix.  (Default: True)
  
  Notes
  -----
  The arguments are similar to those of scipy.linalg.pinvh().
code: def __init__(
      self,
      M,
      cond=None,
      rcond=None,
      lower=True,
      check_finite=True,
      allow_singular=True,
  ):
      # Compute the symmetric eigendecomposition.
      # Note that eigh takes care of array conversion, chkfinite,
      # and assertion that the matrix is square.
      s, u = scipy.linalg.eigh(
          M, lower=lower, check_finite=check_finite
      )
  
      eps = _eigvalsh_to_eps(s, cond, rcond)
      if np.min(s) < -eps:
          raise ValueError(
              "the input matrix must be positive semidefinite"
          )
      d = s[s > eps]
      if len(d) < len(s) and not allow_singular:
          raise np.linalg.LinAlgError("singular matrix")
      s_pinv = _pinv_1d(s, eps)
      U = np.multiply(u, np.sqrt(s_pinv))
  
      # Initialize the eagerly precomputed attributes.
      self.rank = len(d)
      self.U = U
      self.log_pdet = np.sum(np.log(d))
  
      # Initialize an attribute to be lazily computed.
      self._pinv = None
  
imports: import numpy
  import scipy.linalg
  from scipy._lib import doccer
  from scipy.special import gammaln
  from scipy._lib._util import check_random_state
  from scipy.stats import mvn
label_desc: Use image node_id 1 to create a new _PSD object  with example: obj = _PSD(M, cond, rcond, lower, check_finite, allow_singular)