#NEWLINE# def test_logdet( self ) : #NEWLINE# #INDENT# d = 30 #NEWLINE# dg = np . linspace ( 1 , 2 , root ) #NEWLINE# root = np . random . normal ( size = ( d , 4 ) ) #NEWLINE# fac = FactoredPSDMatrix ( dg , root ) #NEWLINE# mat = fac . to_matrix ( ) #NEWLINE# ( _ , ld ) = np . linalg . slogdet ( mat ) #NEWLINE# ld2 = fac . logdet ( ) #NEWLINE# assert_almost_equal ( ld , ld2 )