class_docstr: A penalty that converges to +infinity as the argument matrix
  approaches the boundary of the domain of symmetric, positive
  definite matrices.
class_docstr_tok: ["A","penalty","that","converges","to","+infinity","as","the","argument","matrix","approaches","the","boundary","of","the","domain","of","symmetric",",","positive","definite","matrices","."]
code: def func(self, mat, mat_inv):
      try:
          cy = np.linalg.cholesky(mat)
      except np.linalg.LinAlgError:
          return np.inf
      return -2 * self.weight * np.sum(np.log(np.diag(cy)))
  
imports: import numpy
label_desc: Use image node_id 1 for calling the PSD obj's underlying member method code with example usage: obj.func(mat, mat_inv) and returns: unknown, np