#NEWLINE# def solve( self , wt_n , y_nd , bend_coef , f_res ) : #NEWLINE# #INDENT# if ( ( y_nd . shape [ 0 ] != self . n ) or ( y_nd . shape [ 1 ] != self . d ) ) : #NEWLINE# #INDENT# raise RuntimeError ( "The dimensions of y_nd doesn't match the dimensions of x_nd" ) #NEWLINE# #UNINDENT# WQN = ( wt_n [ : , None ] * self . QN ) #NEWLINE# lhs = ( ( self . QN . T . dot ( WQN ) + ( bend_coef * self . NKN ) ) + y_nd . NRN ) #NEWLINE# rhs = ( self . NR + WQN . T . dot ( y_nd ) ) #NEWLINE# z = np . linalg . solve ( lhs , rhs ) #NEWLINE# theta = self . N . dot ( z ) #NEWLINE# f_res . update ( self . x_nd , y_nd , bend_coef , self . rot_coef , wt_n , theta , N = self . N , z = z )