#NEWLINE# def _compute( self , data_1 , data_2 ) : #NEWLINE# #INDENT# kernel = np . ones ( ( data_1 . shape [ 0 ] , data_1 . shape [ 0 ] ) ) #NEWLINE# for d in range ( data_1 . shape [ 1 ] ) : #NEWLINE# #INDENT# column_1 = data_1 [ : , d ] . reshape ( ( - 1 ) , 1 ) #NEWLINE# column_2 = data_2 [ : , d ] . reshape ( ( - 1 ) , 1 ) #NEWLINE# if ( self . _c is None ) : #NEWLINE# #INDENT# kernel *= self . _h ( ( ( column_1 - column_2 . T ) / self . _a ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# kernel *= ( self . _h ( ( ( column_1 - self . _c ) / self . _a ) ) * self . _h ( ( ( column_2 . T - self . _c ) / self . _a ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return kernel