Did I find the right examples for you? yes no

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/s/y/sympy-0.7.5/sympy/unify/usympy.py   sympy(Download)
 
from sympy.core import Basic, Expr, Tuple, Add, Mul, Pow, FiniteSet
from sympy.matrices import MatAdd, MatMul, MatrixExpr
from sympy.core.sets import Union, Intersection, FiniteSet
from sympy.core.operations import AssocOp, LatticeOp

src/s/y/sympy-HEAD/sympy/unify/usympy.py   sympy(Download)
 
from sympy.core import Basic, Expr, Tuple, Add, Mul, Pow, FiniteSet
from sympy.matrices import MatAdd, MatMul, MatrixExpr
from sympy.core.sets import Union, Intersection, FiniteSet
from sympy.core.operations import AssocOp, LatticeOp

src/s/y/sympy-0.7.5/sympy/matrices/expressions/tests/test_matrix_exprs.py   sympy(Download)
from sympy.core import S, symbols, Add, Mul
from sympy.functions import transpose, sin, cos, sqrt
from sympy.simplify import simplify
from sympy.matrices import (Identity, ImmutableMatrix, Inverse, MatAdd, MatMul,
        MatPow, Matrix, MatrixExpr, MatrixSymbol, ShapeError, ZeroMatrix,
def test_matadd_simplify():
    A = MatrixSymbol('A', 1, 1)
    assert simplify(MatAdd(A, ImmutableMatrix([[sin(x)**2 + cos(x)**2]]))) == \
        MatAdd(A, ImmutableMatrix([[1]]))
 
def test_invariants():
    A = MatrixSymbol('A', n, m)
    B = MatrixSymbol('B', m, l)
    X = MatrixSymbol('X', n, n)
    objs = [Identity(n), ZeroMatrix(m, n), A, MatMul(A, B), MatAdd(A, A),

src/s/y/sympy-HEAD/sympy/matrices/expressions/tests/test_matrix_exprs.py   sympy(Download)
from sympy.core import S, symbols, Add, Mul
from sympy.functions import transpose, sin, cos, sqrt
from sympy.simplify import simplify
from sympy.matrices import (Identity, ImmutableMatrix, Inverse, MatAdd, MatMul,
        MatPow, Matrix, MatrixExpr, MatrixSymbol, ShapeError, ZeroMatrix,
def test_matadd_simplify():
    A = MatrixSymbol('A', 1, 1)
    assert simplify(MatAdd(A, ImmutableMatrix([[sin(x)**2 + cos(x)**2]]))) == \
        MatAdd(A, ImmutableMatrix([[1]]))
 
def test_invariants():
    A = MatrixSymbol('A', n, m)
    B = MatrixSymbol('B', m, l)
    X = MatrixSymbol('X', n, n)
    objs = [Identity(n), ZeroMatrix(m, n), A, MatMul(A, B), MatAdd(A, A),