projects/nnum/decomposition/decomposition.py
def qr_decomposition(a):
    """Calculate matrices Q and R from a given matrix A (:a).

    This function will raise a ValueError if matrix A isn't QR decomposable.

    :param a the matrix that should be decomposed into Q and R.

    :return
        Q: decomposed orthogonal matrix | Q.Q^T = I.
        R: decomposed upper triangular matrix | QR = A.
    """
    if a.shape[0] < a.shape[1]:
        raise ValueError('A e R^[%i, %i] is not QR decomposable.' % a.shape)

    return _qr_decomposition(a, a.shape[1])
Calculate matrices Q and R from a given matrix A (:a).

    This function will raise a ValueError if matrix A isn't QR decomposable.

    :param a the matrix that should be decomposed into Q and R.

    :return
        Q: decomposed orthogonal matrix | Q.Q^T = I.
        R: decomposed upper triangular matrix | QR = A.
    
Calculate matrices Q and R from a given matrix A (:a).
This function will raise a ValueError if matrix A isn't QR decomposable.

:param a the matrix that should be decomposed into Q and R.


Calculate matrices Q and R from a given matrix A ( : a ) . This function will raise a ValueError if matrix A isn ' t QR decomposable . : param a the matrix that should be decomposed into Q and R .
def qr_decomposition(a):
    if a.shape[0] < a.shape[1]:
        raise ValueError('A e R^[%i, %i] is not QR decomposable.' % a.shape)
    return _qr_decomposition(a, a.shape[1])
def qr_decomposition ( a ) : if a . shape [ 0 ] < a . shape [ 1 ] : raise ValueError ( 'A e R^[%i, %i] is not QR decomposable.' % a . shape ) return _qr_decomposition ( a , a . shape [ 1 ] )
Calculate matrices Q and R from a given matrix A (:a).
Calculate matrices Q and R from a given matrix A ( : a ) .
"""Calculate matrices Q and R from a given matrix A (:a).

    This function will raise a ValueError if matrix A isn't QR decomposable.

    :param a the matrix that should be decomposed into Q and R.

    :return
        Q: decomposed orthogonal matrix | Q.Q^T = I.
        R: decomposed upper triangular matrix | QR = A.
    """
a