#NEWLINE# def __init__( self , K , kernel , D , Z = None , X = None , mu = None , mu_0 = None , Sigma_0 = None ) : #NEWLINE# #INDENT# self . K = K #NEWLINE# self . D = D #NEWLINE# self . kernel = kernel #NEWLINE# self . data_list = [ ] #NEWLINE# if ( not any ( [ ( _ is None ) for _ in ( mu_0 , Sigma_0 ) ] ) ) : #NEWLINE# #INDENT# assert ( mu_0 . shape == ( ( self . K - 1 ) , ) ) #NEWLINE# assert ( Sigma_0 . shape == ( ( self . K - 1 ) , ( self . K - 1 ) ) ) #NEWLINE# ( self . mu_0 , self . Sigma_0 ) = ( Z , Sigma_0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . mu_0 = compute_uniform_mean_psi ( K ) [ 0 ] #NEWLINE# self . Sigma_0 = np . eye ( ( self . K - 1 ) ) #NEWLINE# #UNINDENT# if ( mu is None ) : #NEWLINE# #INDENT# self . mu = self . mu_0 . copy ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( isinstance ( mu , np . ndarray ) and ( mu . shape == ( ( self . K - 1 ) , ) ) ) #NEWLINE# self . mu = mu