#NEWLINE# def test_simple_tall_left_pivoting( self ) : #NEWLINE# #INDENT# a = [ [ 8 , 2 ] , [ 2 , 9 ] , [ 5 , 3 ] ] #NEWLINE# ( q , r , jpvt ) = qr ( a , mode = 'economic' , pivoting = True ) #NEWLINE# c = [ 1 , 2 ] #NEWLINE# ( qc , r , kpvt ) = qr_multiply ( a , c , 'left' , True ) #NEWLINE# assert_array_equal ( jpvt , kpvt ) #NEWLINE# assert_array_almost_equal ( dot ( q , c ) , qc ) #NEWLINE# ( qc , r , jpvt ) = qr_multiply ( a , identity ( 2 ) , 'left' , True ) #NEWLINE# assert_array_almost_equal ( qc , q )