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

# sympy.matrices.expressions.Transpose

All Samples(50)  |  Call(41)  |  Derive(0)  |  Import(9)

```from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices.expressions import MatrixSymbol, Adjoint, trace, Transpose
from sympy.matrices import eye, Matrix
from sympy import symbols, S, assuming, Q

```
```def test_transpose():
Sq = MatrixSymbol('Sq', n, n)

assert transpose(A) == Transpose(A)
assert Transpose(A).shape == (m, n)
assert Transpose(A*B).shape == (l, n)
assert transpose(Transpose(A)) == A
assert isinstance(Transpose(Transpose(A)), Transpose)
```

```from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices.expressions import MatrixSymbol, Adjoint, trace, Transpose
from sympy.matrices import eye, Matrix
from sympy import symbols, S, assuming, Q

```
```def test_transpose():
Sq = MatrixSymbol('Sq', n, n)

assert transpose(A) == Transpose(A)
assert Transpose(A).shape == (m, n)
assert Transpose(A*B).shape == (l, n)
assert transpose(Transpose(A)) == A
assert isinstance(Transpose(Transpose(A)), Transpose)
```

```from sympy.core import Lambda, S, symbols
from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices import eye, Matrix, ShapeError
from sympy.matrices.expressions import (
Adjoint, Identity, FunctionMatrix, MatrixExpr, MatrixSymbol, Determinant,
```
```def test_eval_determinant():
assert det(Identity(n)) == 1
assert det(ZeroMatrix(n, n)) == 0
assert det(Transpose(A)) == det(A)

```

```from sympy.core import symbols, S
from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices.expressions import MatrixSymbol, Adjoint, trace, Transpose
from sympy.matrices import eye, Matrix

```
```    assert isinstance(Adjoint(Adjoint(A)), Adjoint)

```

```from sympy.core import symbols, S
from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices.expressions import MatrixSymbol, Adjoint, trace, Transpose
from sympy.matrices import eye, Matrix

```
```    assert isinstance(Adjoint(Adjoint(A)), Adjoint)

```

```from sympy.matrices.expressions.blockmatrix import (block_collapse, bc_matmul,
bc_transpose, blockcut, reblock_2x2, deblock)
from sympy.matrices.expressions import (MatrixSymbol, Identity, MatMul,
Inverse, trace, Transpose, det)
```
```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():
```

```from sympy.matrices.expressions.blockmatrix import (block_collapse, bc_matmul,
bc_transpose, blockcut, reblock_2x2, deblock)
from sympy.matrices.expressions import (MatrixSymbol, Identity, MatMul,
Inverse, trace, Transpose, det)
```
```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():
```

```from sympy.core import I, symbols
from sympy.matrices import Identity, Inverse, Matrix, MatrixSymbol, ZeroMatrix
from sympy.matrices.expressions import Adjoint, Transpose, det
from sympy.matrices.expressions.matmul import (factor_in_front, remove_ids,
```
```def test_transpose():
assert transpose(A*B) == Transpose(B)*Transpose(A)
assert transpose(2*A*B) == 2*Transpose(B)*Transpose(A)
assert transpose(2*I*C) == 2*I*Transpose(C)

```

```from sympy.core import I, symbols
```def test_transpose():