

def test_IndexedBase_shape():
    (i, j, m, n) = symbols('i j m n', integer=True)
    a = IndexedBase('a', shape=(n, m))
    b = IndexedBase('a', shape=(m, n))
    assert (b.shape == Tuple(m, n))
    assert (a[(i, j)] != b[(i, j)])
    assert (a[(i, j)] == b[(i, j)].subs(n, m))
    assert (b.func(*b.args) == b)
    assert (b[(i, j)].func(*b[(i, j)].args) == b[(i, j)])
    raises(IndexException, (lambda : b[i]))
    raises(IndexException, (lambda : b[(i, i, j)]))

dataset/ETHPy150Open sympy/sympy/sympy/tensor/tests/test_indexed.py test_IndexedBase_shape/VarMisuse@37/52 `m`->`n`