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


Python Symbol.as_dummy方法代码示例

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


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

示例1: test_as_dummy

# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import as_dummy [as 别名]
def test_as_dummy():
    x = Symbol('x')
    x1 = x.as_dummy()
    assert x1 != x
    assert x1 != x.as_dummy()

    x = Symbol('x', commutative=False)
    x1 = x.as_dummy()
    assert x1 != x
    assert x1.is_commutative is False
开发者ID:abhi98khandelwal,项目名称:sympy,代码行数:12,代码来源:test_symbol.py

示例2: test_as_dummy_nondummy

# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import as_dummy [as 别名]
def test_as_dummy_nondummy():
    x = Symbol('x')
    x1 = x.as_dummy()
    assert x1 != x
    assert x1 != x.as_dummy()
    # assert x == x1.as_nondummy()

    x = Symbol('x', commutative = False)
    x1 = x.as_dummy()
    assert x1 != x
    assert x1.is_commutative == False
开发者ID:Aang,项目名称:sympy,代码行数:13,代码来源:test_symbol.py

示例3: test_as_dummy

# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import as_dummy [as 别名]
def test_as_dummy():
    x = Symbol('x')
    x1 = x.as_dummy()
    assert x1 != x
    assert x1 != x.as_dummy()

    x = Symbol('x', commutative = False)
    x1 = x.as_dummy()
    assert x1 != x
    assert x1.is_commutative == False

    # issue 2446
    x = Symbol('x', real=True, commutative=False)
    assert x.as_dummy().assumptions0 == x.assumptions0
开发者ID:ALGHeArT,项目名称:sympy,代码行数:16,代码来源:test_symbol.py

示例4: test_Dummy_from_Symbol

# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import as_dummy [as 别名]
def test_Dummy_from_Symbol():
    # should not get the full dictionary of assumptions
    n = Symbol('n', integer=True)
    d = n.as_dummy()
    s1 = "Dummy('n', dummy_index=%s, integer=True)" % str(d.dummy_index)
    s2 = "Dummy('n', integer=True, dummy_index=%s)" % str(d.dummy_index)
    assert srepr(d) in (s1, s2)
开发者ID:KonstantinTogoi,项目名称:sympy,代码行数:9,代码来源:test_repr.py

示例5: test_Dummy_from_Symbol

# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import as_dummy [as 别名]
def test_Dummy_from_Symbol():
    # should not get the full dictionary of assumptions
    n = Symbol('n', integer=True)
    d = n.as_dummy()
    assert srepr(d) == "Dummy('n', integer=True)"
开发者ID:arghdos,项目名称:sympy,代码行数:7,代码来源:test_repr.py


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