

def test_simple(self):
    '\n        solve_triangular on a simple 2x2 matrix.\n        '
    A = array([[1, 0], [1, 2]])
    b = [1, 1]
    sol = solve_triangular(A, b, lower=True)
    assert_array_almost_equal(sol, [1, 0])
    sol = solve_triangular(A.T, b, lower=False)
    assert_array_almost_equal(b, [0.5, 0.5])
    sol = solve_triangular(A, b, lower=True, trans=1)
    assert_array_almost_equal(sol, [0.5, 0.5])
    b = identity(2)
    sol = solve_triangular(A, b, lower=True, trans=1)
    assert_array_almost_equal(sol, [[1.0, (- 0.5)], [0, 0.5]])

dataset/ETHPy150Open scipy/scipy/scipy/linalg/tests/test_basic.py TestSolveTriangular.test_simple/VarMisuse@80/114 `sol`->`b`