projects/nnum/decomposition/solvers.py
def backward_elimination(u, z):
    """Perform backward elimination over a Ux = z linear system.

    :param u: a upper triangular matrix retrieved from a method such as LU Decomposition.
    :param z: the response column-vector of the linear system.
    :return: x, where z = Ux.
    """
    x = z.copy().astype(float)

    for k in range(z.shape[0] - 1, -1, -1):
        x[k] -= np.sum(x[k + 1:] * u[k, k + 1:])
        x[k] /= u[k, k]

    return x
Perform backward elimination over a Ux = z linear system.

    :param u: a upper triangular matrix retrieved from a method such as LU Decomposition.
    :param z: the response column-vector of the linear system.
    :return: x, where z = Ux.
    
Perform backward elimination over a Ux = z linear system.
Perform backward elimination over a Ux = z linear system .
def backward_elimination(u, z):
    x = z.copy().astype(float)
    for k in range(z.shape[0] - 1, -1, -1):
        x[k] -= np.sum(x[k + 1:] * u[k, k + 1:])
        x[k] /= u[k, k]
    return x
def backward_elimination ( u , z ) : x = z . copy ( ) . astype ( float ) for k in range ( z . shape [ 0 ] - 1 , - 1 , - 1 ) : x [ k ] -= np . sum ( x [ k + 1 : ] * u [ k , k + 1 : ] ) x [ k ] /= u [ k , k ] return x
Perform backward elimination over a Ux = z linear system.
Perform backward elimination over a Ux = z linear system .
"""Perform backward elimination over a Ux = z linear system.

    :param u: a upper triangular matrix retrieved from a method such as LU Decomposition.
    :param z: the response column-vector of the linear system.
    :return: x, where z = Ux.
    """
x, where z = Ux.
x where z = Ux .
u
a upper triangular matrix retrieved from a method such as LU Decomposition.
a upper triangular matrix retrieved from a method such as LU Decomposition .
z
the response column-vector of the linear system.
the response column - vector of the linear system .