def test_QR_House_Q_from_QR_House_orthogonal():
    'verify the orthogonality of the computed Q'
    np.random.seed(78)
    M = 6
    N = 5
    A = np.random.rand(M,N)
    qra.QR_House(A)
    Q = qra.Q_from_QR_House(A=A)
    aae(np.identity(M), np.dot(Q.T,Q), decimal=10)
def test_QR_House_Q_from_QR_House_decomposition():
    'verify the computed Q and R matrices'
    np.random.seed(7)
    M = 6
    N = 5
    A = np.random.rand(M,N)
    A2 = A.copy()
    qra.QR_House(A2)
    Q = qra.Q_from_QR_House(A=A2)
    R = np.triu(A2)
    aae(A, np.dot(Q, R), decimal=10)