#NEWLINE# def K( self , X , X2 = None ) : #NEWLINE# #INDENT# if ( ( X2 is None ) and ( X . shape [ 0 ] == self . variance . shape [ 0 ] ) ) : #NEWLINE# #INDENT# return ( np . eye ( X . shape [ 0 ] ) * self . variance ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return 0.0