

def test_singular(self):
    c = np.array([1, 1, 0, 0])
    b = np.array([1, 2, 3, 4])
    x = solve_circulant(c, b, singular='lstsq')
    (y, res, rnk, s) = lstsq(circulant(c), b)
    assert_allclose(x, y)
    assert_raises(LinAlgError, solve_circulant, x, y)

dataset/ETHPy150Open scipy/scipy/scipy/linalg/tests/test_basic.py TestSolveCirculant.test_singular/original