本文整理汇总了Python中sympy.polys.domains.QQ.get_ring方法的典型用法代码示例。如果您正苦于以下问题:Python QQ.get_ring方法的具体用法?Python QQ.get_ring怎么用?Python QQ.get_ring使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.polys.domains.QQ
的用法示例。
在下文中一共展示了QQ.get_ring方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_Domain_get_ring
# 需要导入模块: from sympy.polys.domains import QQ [as 别名]
# 或者: from sympy.polys.domains.QQ import get_ring [as 别名]
def test_Domain_get_ring():
assert ZZ.has_assoc_Ring is True
assert QQ.has_assoc_Ring is True
assert ZZ[x].has_assoc_Ring is True
assert QQ[x].has_assoc_Ring is True
assert ZZ[x, y].has_assoc_Ring is True
assert QQ[x, y].has_assoc_Ring is True
assert ZZ.frac_field(x).has_assoc_Ring is True
assert QQ.frac_field(x).has_assoc_Ring is True
assert ZZ.frac_field(x, y).has_assoc_Ring is True
assert QQ.frac_field(x, y).has_assoc_Ring is True
assert EX.has_assoc_Ring is False
assert RR.has_assoc_Ring is False
assert ALG.has_assoc_Ring is False
assert ZZ.get_ring() == ZZ
assert QQ.get_ring() == ZZ
assert ZZ[x].get_ring() == ZZ[x]
assert QQ[x].get_ring() == QQ[x]
assert ZZ[x, y].get_ring() == ZZ[x, y]
assert QQ[x, y].get_ring() == QQ[x, y]
assert ZZ.frac_field(x).get_ring() == ZZ[x]
assert QQ.frac_field(x).get_ring() == QQ[x]
assert ZZ.frac_field(x, y).get_ring() == ZZ[x, y]
assert QQ.frac_field(x, y).get_ring() == QQ[x, y]
assert EX.get_ring() == EX
assert RR.get_ring() == RR
# XXX: This should also be like RR
raises(DomainError, lambda: ALG.get_ring())
示例2: test_Domain_get_ring
# 需要导入模块: from sympy.polys.domains import QQ [as 别名]
# 或者: from sympy.polys.domains.QQ import get_ring [as 别名]
def test_Domain_get_ring():
assert ZZ.has_assoc_Ring == True
assert QQ.has_assoc_Ring == True
assert ZZ[x].has_assoc_Ring == True
assert QQ[x].has_assoc_Ring == True
assert ZZ[x,y].has_assoc_Ring == True
assert QQ[x,y].has_assoc_Ring == True
assert ZZ.frac_field(x).has_assoc_Ring == True
assert QQ.frac_field(x).has_assoc_Ring == True
assert ZZ.frac_field(x,y).has_assoc_Ring == True
assert QQ.frac_field(x,y).has_assoc_Ring == True
assert EX.has_assoc_Ring == False
assert RR.has_assoc_Ring == False
assert ALG.has_assoc_Ring == False
assert ZZ.get_ring() == ZZ
assert QQ.get_ring() == ZZ
assert ZZ[x].get_ring() == ZZ[x]
assert QQ[x].get_ring() == QQ[x]
assert ZZ[x,y].get_ring() == ZZ[x,y]
assert QQ[x,y].get_ring() == QQ[x,y]
assert ZZ.frac_field(x).get_ring() == ZZ[x]
assert QQ.frac_field(x).get_ring() == QQ[x]
assert ZZ.frac_field(x,y).get_ring() == ZZ[x,y]
assert QQ.frac_field(x,y).get_ring() == QQ[x,y]
raises(DomainError, "EX.get_ring()")
raises(DomainError, "RR.get_ring()")
raises(DomainError, "ALG.get_ring()")
示例3: test_Domain_get_ring
# 需要导入模块: from sympy.polys.domains import QQ [as 别名]
# 或者: from sympy.polys.domains.QQ import get_ring [as 别名]
def test_Domain_get_ring():
assert ZZ.has_assoc_Ring is True
assert QQ.has_assoc_Ring is True
assert ZZ[x].has_assoc_Ring is True
assert QQ[x].has_assoc_Ring is True
assert ZZ[x, y].has_assoc_Ring is True
assert QQ[x, y].has_assoc_Ring is True
assert ZZ.frac_field(x).has_assoc_Ring is True
assert QQ.frac_field(x).has_assoc_Ring is True
assert ZZ.frac_field(x, y).has_assoc_Ring is True
assert QQ.frac_field(x, y).has_assoc_Ring is True
assert EX.has_assoc_Ring is False
assert RR.has_assoc_Ring is False
assert ALG.has_assoc_Ring is False
assert ZZ.get_ring() == ZZ
assert QQ.get_ring() == ZZ
assert ZZ[x].get_ring() == ZZ[x]
assert QQ[x].get_ring() == QQ[x]
assert ZZ[x, y].get_ring() == ZZ[x, y]
assert QQ[x, y].get_ring() == QQ[x, y]
assert ZZ.frac_field(x).get_ring() == ZZ[x]
assert QQ.frac_field(x).get_ring() == QQ[x]
assert ZZ.frac_field(x, y).get_ring() == ZZ[x, y]
assert QQ.frac_field(x, y).get_ring() == QQ[x, y]
assert EX.get_ring() == EX
raises(DomainError, lambda: RR.get_ring())
raises(DomainError, lambda: ALG.get_ring())