#NEWLINE# def test_random_trap_economic( self ) : #NEWLINE# #INDENT# m = 100 #NEWLINE# n = 200 #NEWLINE# for k in range ( 2 ) : #NEWLINE# #INDENT# a = random ( [ m , n ] ) #NEWLINE# ( r , q ) = rq ( a , mode = 'economic' ) #NEWLINE# assert_array_almost_equal ( dot ( q , transpose ( q ) ) , identity ( m ) ) #NEWLINE# assert_array_almost_equal ( dot ( r , q ) , a ) #NEWLINE# assert_equal ( q . shape , ( m , n ) ) #NEWLINE# assert_equal ( r . shape , ( m , m ) )