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 deriv(self, mat, mat_inv):
      cy = mat_inv.copy()
      cy = 2 * cy - np.diag(np.diag(cy))
      i, j = np.tril_indices(mat.shape[0])
      return -self.weight * cy[i, j]
  
imports: import numpy
label_desc: Use image node_id 2 for calling the PSD obj's underlying member method code with example usage: obj.deriv(mat, mat_inv) and returns: unknown