Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/s/y/sympy-HEAD/sympy/matrices/expressions/tests/test_trace.py   sympy(Download)
    assert trace(ZeroMatrix(5, 5)) == 0
    assert trace(2*A*B) == 2 * trace(A*B)
    assert trace(A.T) == trace(A)
 
    i, j = symbols('i j')

src/s/y/sympy-HEAD/sympy/matrices/expressions/tests/test_blockmatrix.py   sympy(Download)
def test_bc_transpose():
    assert bc_transpose(Transpose(BlockMatrix([[A, B], [C, D]]))) == \
            BlockMatrix([[A.T, C.T], [B.T, D.T]])
 
def test_bc_dist_diag():
    assert block_collapse(A + 2*E) == A + 2*E
    F = MatrixSymbol('F', m, m)
    assert block_collapse(E.T*A*F) == E.T*A*F
 
    assert X.shape == (l + n, k + m)

src/s/y/sympy-HEAD/sympy/assumptions/tests/test_matrices.py   sympy(Download)
def test_square():
    assert ask(Q.square(X))
    assert not ask(Q.square(Y))
    assert ask(Q.square(Y*Y.T))
 
    assert ask(Q.invertible(X*Z), Q.invertible(X)) is None
    assert ask(Q.invertible(X*Z), Q.invertible(X) & Q.invertible(Z)) is True
    assert ask(Q.invertible(X.T)) is None
    assert ask(Q.invertible(X.T), Q.invertible(X)) is True
    assert ask(Q.invertible(X.I)) is True
    assert ask(Q.symmetric(X + Z), Q.symmetric(X) & Q.symmetric(Z)) is True
    assert ask(Q.symmetric(Y)) is False
    assert ask(Q.symmetric(Y*Y.T)) is True
    assert ask(Q.symmetric(Y.T*X*Y)) is None
    assert ask(Q.symmetric(Y.T*X*Y), Q.symmetric(X)) is True

src/s/y/sympy-0.7.5/sympy/matrices/expressions/tests/test_trace.py   sympy(Download)
    assert trace(ZeroMatrix(5, 5)) == 0
    assert trace(2*A*B) == 2 * trace(A*B)
    assert trace(A.T) == trace(A)
 
    i, j = symbols('i j')

src/s/y/sympy-0.7.5/sympy/matrices/expressions/tests/test_blockmatrix.py   sympy(Download)
def test_bc_transpose():
    assert bc_transpose(Transpose(BlockMatrix([[A, B], [C, D]]))) == \
            BlockMatrix([[A.T, C.T], [B.T, D.T]])
 
def test_bc_dist_diag():
    assert block_collapse(A + 2*E) == A + 2*E
    F = MatrixSymbol('F', m, m)
    assert block_collapse(E.T*A*F) == E.T*A*F
 
    assert X.shape == (l + n, k + m)

src/s/y/sympy-0.7.5/sympy/assumptions/tests/test_matrices.py   sympy(Download)
def test_square():
    assert ask(Q.square(X))
    assert not ask(Q.square(Y))
    assert ask(Q.square(Y*Y.T))
 
    assert ask(Q.invertible(X*Z), Q.invertible(X)) is None
    assert ask(Q.invertible(X*Z), Q.invertible(X) & Q.invertible(Z)) is True
    assert ask(Q.invertible(X.T)) is None
    assert ask(Q.invertible(X.T), Q.invertible(X)) is True
    assert ask(Q.invertible(X.I)) is True
    assert ask(Q.symmetric(X + Z), Q.symmetric(X) & Q.symmetric(Z)) is True
    assert ask(Q.symmetric(Y)) is False
    assert ask(Q.symmetric(Y*Y.T)) is True
    assert ask(Q.symmetric(Y.T*X*Y)) is None
    assert ask(Q.symmetric(Y.T*X*Y), Q.symmetric(X)) is True