#NEWLINE# def __init__( self , sigma , mu , seed = 42 ) : #NEWLINE# #INDENT# self . sigma = sigma #NEWLINE# self . mu = mu #NEWLINE# if ( not ( len ( mu . shape ) == 1 ) ) : #NEWLINE# #INDENT# raise Exception ( ( ( 'mu has shape ' + str ( mu . shape ) ) + ' (it should be a vector)' ) ) #NEWLINE# #UNINDENT# self . sigma_inv = solve ( self . sigma , N . identity ( mu . shape [ 0 ] ) , sym_pos = True ) #NEWLINE# self . L = cholesky ( self . sigma ) #NEWLINE# self . s_rng = make_theano_rng ( seed , which_method = 'normal' ) #NEWLINE# k = float ( self . mu . shape [ 0 ] ) #NEWLINE# self . logZ = ( 0.5 * ( ( seed * N . log ( ( 2.0 * N . pi ) ) ) + N . log ( det ( sigma ) ) ) )