Did I find the right examples for you? yes no

# sympy.matrices.Transpose

All Samples(20)  |  Call(14)  |  Derive(0)  |  Import(6)

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,

    X = MatrixSymbol('X', n, n)
objs = [Identity(n), ZeroMatrix(m, n), A, MatMul(A, B), MatAdd(A, A),
Transpose(A), Adjoint(A), Inverse(X), MatPow(X, 2), MatPow(X, -1),
MatPow(X, 0)]
for obj in objs:


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,

    X = MatrixSymbol('X', n, n)
objs = [Identity(n), ZeroMatrix(m, n), A, MatMul(A, B), MatAdd(A, A),
Transpose(A), Adjoint(A), Inverse(X), MatPow(X, 2), MatPow(X, -1),
MatPow(X, 0)]
for obj in objs:


src/s/y/sympy-0.7.5/sympy/printing/pretty/tests/test_pretty.py   sympy(Download)
def test_Adjoint():
from sympy.matrices import Adjoint, Inverse, MatrixSymbol, Transpose
X = MatrixSymbol('X', 2, 2)
Y = MatrixSymbol('Y', 2, 2)
assert pretty(Adjoint(X)) == " +\nX "

    assert pretty(Adjoint(Inverse(X))) == "     +\n/ -1\\ \n\\X  / "
assert pretty(Inverse(Adjoint(X))) == "    -1\n/ +\\  \n\\X /  "
assert pretty(Adjoint(Transpose(X))) == "    +\n/ T\\ \n\\X / "
assert pretty(Transpose(Adjoint(X))) == "    T\n/ +\\ \n\\X / "
assert upretty(Adjoint(X)) == u(" †\nX ")

    assert upretty(Inverse(Adjoint(X))) == \
u("    -1\n⎛ †⎞  \n⎝X ⎠  ")
assert upretty(Adjoint(Transpose(X))) == \
u("    †\n⎛ T⎞ \n⎝X ⎠ ")
assert upretty(Transpose(Adjoint(X))) == \


src/s/y/sympy-HEAD/sympy/printing/pretty/tests/test_pretty.py   sympy(Download)
def test_Adjoint():
from sympy.matrices import Adjoint, Inverse, MatrixSymbol, Transpose
X = MatrixSymbol('X', 2, 2)
Y = MatrixSymbol('Y', 2, 2)
assert pretty(Adjoint(X)) == " +\nX "

    assert pretty(Adjoint(Inverse(X))) == "     +\n/ -1\\ \n\\X  / "
assert pretty(Inverse(Adjoint(X))) == "    -1\n/ +\\  \n\\X /  "
assert pretty(Adjoint(Transpose(X))) == "    +\n/ T\\ \n\\X / "
assert pretty(Transpose(Adjoint(X))) == "    T\n/ +\\ \n\\X / "
assert upretty(Adjoint(X)) == u(" †\nX ")

    assert upretty(Inverse(Adjoint(X))) == \
u("    -1\n⎛ †⎞  \n⎝X ⎠  ")
assert upretty(Adjoint(Transpose(X))) == \
u("    †\n⎛ T⎞ \n⎝X ⎠ ")
assert upretty(Transpose(Adjoint(X))) == \


src/s/y/sympy-0.7.5/sympy/printing/tests/test_latex.py   sympy(Download)
def test_Adjoint():
from sympy.matrices import MatrixSymbol, Adjoint, Inverse, Transpose
X = MatrixSymbol('X', 2, 2)
Y = MatrixSymbol('Y', 2, 2)
assert latex(Adjoint(X)) == r'X^\dag'

    assert latex(Adjoint(Inverse(X))) == r'\left(X^{-1}\right)^\dag'
assert latex(Inverse(Adjoint(X))) == r'\left(X^\dag\right)^{-1}'
assert latex(Adjoint(Transpose(X))) == r'\left(X^T\right)^\dag'
assert latex(Transpose(Adjoint(X))) == r'\left(X^\dag\right)^T'



src/s/y/sympy-HEAD/sympy/printing/tests/test_latex.py   sympy(Download)
def test_Adjoint():
from sympy.matrices import MatrixSymbol, Adjoint, Inverse, Transpose
X = MatrixSymbol('X', 2, 2)
Y = MatrixSymbol('Y', 2, 2)
assert latex(Adjoint(X)) == r'X^\dag'

    assert latex(Adjoint(Inverse(X))) == r'\left(X^{-1}\right)^\dag'
assert latex(Inverse(Adjoint(X))) == r'\left(X^\dag\right)^{-1}'
assert latex(Adjoint(Transpose(X))) == r'\left(X^T\right)^\dag'
assert latex(Transpose(Adjoint(X))) == r'\left(X^\dag\right)^T'