def fast_logdet(A):
 (sign, ld) = np.linalg.slogdet(A)
 if (not (sign > 0)):
  return (- np.inf)
 return ld

def fast_logdet ( A ) : ( sign , ld ) = np . linalg . slogdet ( A ) if ( not ( sign > 0 ) ) : return ( - np . inf ) return ld
compute log(det(a)) for a symmetric equivalent to : np .