#NEWLINE# def test_gmres_basic( ) : #NEWLINE# #INDENT# A = np . vander ( ( np . arange ( 10 ) + 1 ) ) [ : , : : ( - 1 ) ] #NEWLINE# b = np . zeros ( 10 ) #NEWLINE# b [ 0 ] = 1 #NEWLINE# x = np . linalg . solve ( A , b ) #NEWLINE# ( x_gm , err ) = gmres ( A , b , restart = 5 , maxiter = 1 ) #NEWLINE# assert_allclose ( x_gm [ 0 ] , 0.359 , rtol = 0.01 )