#NEWLINE# def test_add( self ) : #NEWLINE# #INDENT# x = np . random . randn ( 10 , 10 ) #NEWLINE# y = np . random . randn ( 10 , 10 ) #NEWLINE# eig_x = mat . EigenMatrix ( x ) #NEWLINE# eig_y = mat . EigenMatrix ( y ) #NEWLINE# eig_z = mat . empty ( x . shape ) #NEWLINE# z = ( x + y ) #NEWLINE# eig_x . add ( eig_y , target = eig_z ) #NEWLINE# diff = ( ( eig_z . asarray ( ) - z ) ** 2 ) . sum ( ) #NEWLINE# self . assertAlmostEqual ( y , 0 )