本文整理匯總了Python中sympy.polys.domains.EX.get_field方法的典型用法代碼示例。如果您正苦於以下問題:Python EX.get_field方法的具體用法?Python EX.get_field怎麽用?Python EX.get_field使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sympy.polys.domains.EX
的用法示例。
在下文中一共展示了EX.get_field方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_Domain_get_field
# 需要導入模塊: from sympy.polys.domains import EX [as 別名]
# 或者: from sympy.polys.domains.EX import get_field [as 別名]
def test_Domain_get_field():
assert EX.has_assoc_Field == True
assert ZZ.has_assoc_Field == True
assert QQ.has_assoc_Field == True
assert RR.has_assoc_Field == False
assert ALG.has_assoc_Field == True
assert ZZ[x].has_assoc_Field == True
assert QQ[x].has_assoc_Field == True
assert ZZ[x,y].has_assoc_Field == True
assert QQ[x,y].has_assoc_Field == True
assert EX.get_field() == EX
assert ZZ.get_field() == QQ
assert QQ.get_field() == QQ
raises(DomainError, "RR.get_field()")
assert ALG.get_field() == ALG
assert ZZ[x].get_field() == ZZ.frac_field(x)
assert QQ[x].get_field() == QQ.frac_field(x)
assert ZZ[x,y].get_field() == ZZ.frac_field(x,y)
assert QQ[x,y].get_field() == QQ.frac_field(x,y)
示例2: test_Domain_get_field
# 需要導入模塊: from sympy.polys.domains import EX [as 別名]
# 或者: from sympy.polys.domains.EX import get_field [as 別名]
def test_Domain_get_field():
assert EX.has_assoc_Field is True
assert ZZ.has_assoc_Field is True
assert QQ.has_assoc_Field is True
assert RR.has_assoc_Field is True
assert ALG.has_assoc_Field is True
assert ZZ[x].has_assoc_Field is True
assert QQ[x].has_assoc_Field is True
assert ZZ[x, y].has_assoc_Field is True
assert QQ[x, y].has_assoc_Field is True
assert EX.get_field() == EX
assert ZZ.get_field() == QQ
assert QQ.get_field() == QQ
assert RR.get_field() == RR
assert ALG.get_field() == ALG
assert ZZ[x].get_field() == ZZ.frac_field(x)
assert QQ[x].get_field() == QQ.frac_field(x)
assert ZZ[x, y].get_field() == ZZ.frac_field(x, y)
assert QQ[x, y].get_field() == QQ.frac_field(x, y)