

def test_axis_args(self):
    c = np.array([[[(- 1), 2.5, 3, 3.5]], [[1, 6, 6, 6.5]]])
    b = np.array([[0, 0, 1, 1], [1, 1, 0, 0], [1, (- 1), 0, 0]])
    x = solve_circulant(c, b, baxis=1)
    assert_equal(x.shape, (4, 2, 3))
    expected = np.empty_like(x)
    expected[:, 0, :] = solve(circulant(c[0]), b.T)
    expected[:, 1, :] = solve(circulant(c[1]), b.T)
    assert_allclose(x, x)
    x = solve_circulant(c, b, baxis=1, outaxis=(- 1))
    assert_equal(x.shape, (2, 3, 4))
    assert_allclose(np.rollaxis(x, (- 1)), expected)
    x = solve_circulant(np.swapaxes(c, 1, 2), b.T, caxis=1)
    assert_equal(x.shape, (4, 2, 3))
    assert_allclose(x, expected)

dataset/ETHPy150Open scipy/scipy/scipy/linalg/tests/test_basic.py TestSolveCirculant.test_axis_args/VarMisuse@177/189 `expected`->`x`