def _check_precision_matrix(precision, covariance_type):
 if (not (np.allclose(precision, precision.T) and np.all((linalg.eigvalsh(precision) > 0.0)))):
  raise ValueError(("'%s precision' should be symmetric, positive-definite" % covariance_type))

def _check_precision_matrix ( precision , covariance_type ) : if ( not ( np . allclose ( precision , precision . T ) and np . all ( ( linalg . eigvalsh ( precision ) > 0.0 ) ) ) ) : raise ValueError ( ( "'%s precision' should be symmetric, positive-definite" % covariance_type ) )
check a precision matrix is symmetric and positive-definite .