当前位置: 首页>>代码示例>>Python>>正文


Python Q.upper_triangular方法代码示例

本文整理汇总了Python中sympy.Q.upper_triangular方法的典型用法代码示例。如果您正苦于以下问题:Python Q.upper_triangular方法的具体用法?Python Q.upper_triangular怎么用?Python Q.upper_triangular使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sympy.Q的用法示例。


在下文中一共展示了Q.upper_triangular方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_triangular

# 需要导入模块: from sympy import Q [as 别名]
# 或者: from sympy.Q import upper_triangular [as 别名]
def test_triangular():
    assert ask(Q.upper_triangular(X+Z.T+Identity(2)), Q.upper_triangular(X) &
            Q.lower_triangular(Z)) is True
    assert ask(Q.upper_triangular(X*Z.T), Q.upper_triangular(X) &
            Q.lower_triangular(Z)) is True
    assert ask(Q.lower_triangular(Identity(3))) is True
    assert ask(Q.lower_triangular(ZeroMatrix(3, 3))) is True
开发者ID:archipleago-creature,项目名称:sympy,代码行数:9,代码来源:test_matrices.py

示例2: test_diagonal

# 需要导入模块: from sympy import Q [as 别名]
# 或者: from sympy.Q import upper_triangular [as 别名]
def test_diagonal():
    assert ask(Q.diagonal(X + Z.T + Identity(2)), Q.diagonal(X) &
               Q.diagonal(Z)) is True
    assert ask(Q.diagonal(ZeroMatrix(3, 3)))
    assert ask(Q.lower_triangular(X) & Q.upper_triangular(X), Q.diagonal(X))
    assert ask(Q.diagonal(X), Q.lower_triangular(X) & Q.upper_triangular(X))
    assert ask(Q.symmetric(X), Q.diagonal(X))
    assert ask(Q.triangular(X), Q.diagonal(X))
开发者ID:A-turing-machine,项目名称:sympy,代码行数:10,代码来源:test_matrices.py

示例3: test_MatrixSlice

# 需要导入模块: from sympy import Q [as 别名]
# 或者: from sympy.Q import upper_triangular [as 别名]
def test_MatrixSlice():
    X = MatrixSymbol('X', 4, 4)
    B = MatrixSlice(X, (1, 3), (1, 3))
    C = MatrixSlice(X, (0, 3), (1, 3))
    assert ask(Q.symmetric(B), Q.symmetric(X))
    assert ask(Q.invertible(B), Q.invertible(X))
    assert ask(Q.diagonal(B), Q.diagonal(X))
    assert ask(Q.orthogonal(B), Q.orthogonal(X))
    assert ask(Q.upper_triangular(B), Q.upper_triangular(X))

    assert not ask(Q.symmetric(C), Q.symmetric(X))
    assert not ask(Q.invertible(C), Q.invertible(X))
    assert not ask(Q.diagonal(C), Q.diagonal(X))
    assert not ask(Q.orthogonal(C), Q.orthogonal(X))
    assert not ask(Q.upper_triangular(C), Q.upper_triangular(X))
开发者ID:KonstantinTogoi,项目名称:sympy,代码行数:17,代码来源:test_matrices.py

示例4: test_diagonal

# 需要导入模块: from sympy import Q [as 别名]
# 或者: from sympy.Q import upper_triangular [as 别名]
def test_diagonal():
    assert ask(Q.diagonal(X + Z.T + Identity(2)), Q.diagonal(X) &
               Q.diagonal(Z)) is True
    assert ask(Q.diagonal(ZeroMatrix(3, 3)))
    assert ask(Q.lower_triangular(X) & Q.upper_triangular(X), Q.diagonal(X))
    assert ask(Q.diagonal(X), Q.lower_triangular(X) & Q.upper_triangular(X))
    assert ask(Q.symmetric(X), Q.diagonal(X))
    assert ask(Q.triangular(X), Q.diagonal(X))
    assert ask(Q.diagonal(C0x0))
    assert ask(Q.diagonal(A1x1))
    assert ask(Q.diagonal(A1x1 + B1x1))
    assert ask(Q.diagonal(A1x1*B1x1))
    assert ask(Q.diagonal(V1.T*V2))
    assert ask(Q.diagonal(V1.T*(X + Z)*V1))
    assert ask(Q.diagonal(MatrixSlice(Y, (0, 1), (1, 2)))) is True
    assert ask(Q.diagonal(V1.T*(V1 + V2))) is True
开发者ID:KonstantinTogoi,项目名称:sympy,代码行数:18,代码来源:test_matrices.py

示例5: test_LU

# 需要导入模块: from sympy import Q [as 别名]
# 或者: from sympy.Q import upper_triangular [as 别名]
def test_LU():
    L, U = lu(X)
    assert L.shape == U.shape == X.shape
    assert ask(Q.lower_triangular(L))
    assert ask(Q.upper_triangular(U))
开发者ID:A-turing-machine,项目名称:sympy,代码行数:7,代码来源:test_factorizations.py

示例6: test_QR

# 需要导入模块: from sympy import Q [as 别名]
# 或者: from sympy.Q import upper_triangular [as 别名]
def test_QR():
    Q_, R = qr(X)
    assert Q_.shape == R.shape == X.shape
    assert ask(Q.orthogonal(Q_))
    assert ask(Q.upper_triangular(R))
开发者ID:A-turing-machine,项目名称:sympy,代码行数:7,代码来源:test_factorizations.py


注:本文中的sympy.Q.upper_triangular方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。