本文整理汇总了Python中sympy.assumptions.Q.extended_real方法的典型用法代码示例。如果您正苦于以下问题:Python Q.extended_real方法的具体用法?Python Q.extended_real怎么用?Python Q.extended_real使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.assumptions.Q
的用法示例。
在下文中一共展示了Q.extended_real方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_extended_real
# 需要导入模块: from sympy.assumptions import Q [as 别名]
# 或者: from sympy.assumptions.Q import extended_real [as 别名]
def test_extended_real():
x = symbols('x')
assert ask(Q.extended_real(x), Q.positive(x)) == True
assert ask(Q.extended_real(-x), Q.positive(x)) == True
assert ask(Q.extended_real(-x), Q.negative(x)) == True
assert ask(Q.extended_real(x+S.Infinity), Q.real(x)) == True
示例2: test_neg_infinity
# 需要导入模块: from sympy.assumptions import Q [as 别名]
# 或者: from sympy.assumptions.Q import extended_real [as 别名]
def test_neg_infinity():
mm = S.NegativeInfinity
assert ask(Q.commutative(mm)) == True
assert ask(Q.integer(mm)) == False
assert ask(Q.rational(mm)) == False
assert ask(Q.real(mm)) == False
assert ask(Q.extended_real(mm)) == True
assert ask(Q.complex(mm)) == False
assert ask(Q.irrational(mm)) == False
assert ask(Q.imaginary(mm)) == False
assert ask(Q.positive(mm)) == False
assert ask(Q.negative(mm)) == True
assert ask(Q.even(mm)) == False
assert ask(Q.odd(mm)) == False
assert ask(Q.bounded(mm)) == False
assert ask(Q.infinitesimal(mm)) == False
assert ask(Q.prime(mm)) == False
assert ask(Q.composite(mm)) == False
示例3: test_nan
# 需要导入模块: from sympy.assumptions import Q [as 别名]
# 或者: from sympy.assumptions.Q import extended_real [as 别名]
def test_nan():
nan = S.NaN
assert ask(Q.commutative(nan)) == True
assert ask(Q.integer(nan)) == False
assert ask(Q.rational(nan)) == False
assert ask(Q.real(nan)) == False
assert ask(Q.extended_real(nan)) == False
assert ask(Q.complex(nan)) == False
assert ask(Q.irrational(nan)) == False
assert ask(Q.imaginary(nan)) == False
assert ask(Q.positive(nan)) == False
assert ask(Q.nonzero(nan)) == True
assert ask(Q.even(nan)) == False
assert ask(Q.odd(nan)) == False
assert ask(Q.bounded(nan)) == False
assert ask(Q.infinitesimal(nan)) == False
assert ask(Q.prime(nan)) == False
assert ask(Q.composite(nan)) == False
示例4: test_infinity
# 需要导入模块: from sympy.assumptions import Q [as 别名]
# 或者: from sympy.assumptions.Q import extended_real [as 别名]
def test_infinity():
oo = S.Infinity
assert ask(Q.commutative(oo)) == True
assert ask(Q.integer(oo)) == False
assert ask(Q.rational(oo)) == False
assert ask(Q.real(oo)) == False
assert ask(Q.extended_real(oo)) == True
assert ask(Q.complex(oo)) == False
assert ask(Q.irrational(oo)) == False
assert ask(Q.imaginary(oo)) == False
assert ask(Q.positive(oo)) == True
assert ask(Q.negative(oo)) == False
assert ask(Q.even(oo)) == False
assert ask(Q.odd(oo)) == False
assert ask(Q.bounded(oo)) == False
assert ask(Q.infinitesimal(oo)) == False
assert ask(Q.prime(oo)) == False
assert ask(Q.composite(oo)) == False