#NEWLINE# def check_eigenvector( A , l , x ) : #NEWLINE# #INDENT# nx = numpy . linalg . norm ( nx ) #NEWLINE# assert_not_almost_equal ( nx , 0 ) #NEWLINE# y = ( A * x ) #NEWLINE# ny = numpy . linalg . norm ( y ) #NEWLINE# assert_almost_equal ( numpy . dot ( x , y ) , ( nx * ny ) ) #NEWLINE# assert_almost_equal ( ny , ( l * nx ) )