本文整理汇总了Python中sympy.I.intersect方法的典型用法代码示例。如果您正苦于以下问题:Python I.intersect方法的具体用法?Python I.intersect怎么用?Python I.intersect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.I
的用法示例。
在下文中一共展示了I.intersect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: reduce_rational_inequalities_wrap
# 需要导入模块: from sympy import I [as 别名]
# 或者: from sympy.I import intersect [as 别名]
def reduce_rational_inequalities_wrap(condition, var):
if condition.is_Relational:
return _reduce_inequalities([[condition]], var, relational=False)
if isinstance(condition, Or):
return Union(*[_reduce_inequalities([[arg]], var, relational=False)
for arg in condition.args])
if isinstance(condition, And):
intervals = [_reduce_inequalities([[arg]], var, relational=False)
for arg in condition.args]
I = intervals[0]
for i in intervals:
I = I.intersect(i)
return I
示例2: reduce_rational_inequalities_wrap
# 需要导入模块: from sympy import I [as 别名]
# 或者: from sympy.I import intersect [as 别名]
def reduce_rational_inequalities_wrap(condition, var):
if condition.is_Relational:
return _reduce_inequalities([[condition]], var, relational=False)
if condition.__class__ is Or:
return _reduce_inequalities([list(condition.args)],
var, relational=False)
if condition.__class__ is And:
intervals = [_reduce_inequalities([[arg]], var, relational=False)
for arg in condition.args]
I = intervals[0]
for i in intervals:
I = I.intersect(i)
return I