#NEWLINE# def test_check_finite( self ) : #NEWLINE# #INDENT# n = 5 #NEWLINE# A = random ( [ n , n ] ) #NEWLINE# B = random ( [ n , n ] ) #NEWLINE# ( AA , BB , Q , Z ) = qz ( A , B , check_finite = False ) #NEWLINE# assert_array_almost_equal ( dot ( dot ( Q , AA ) , Z . T ) , A ) #NEWLINE# assert_array_almost_equal ( dot ( dot ( Q , BB ) , Z . T ) , B ) #NEWLINE# assert_array_almost_equal ( dot ( Q , AA . T ) , eye ( n ) ) #NEWLINE# assert_array_almost_equal ( dot ( Z , Z . T ) , eye ( n ) ) #NEWLINE# assert_ ( all ( ( diag ( BB ) >= 0 ) ) )