Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium Solvers
New issue 3191 by [email protected]: 'Intersection' object has no
attribute 'as_relational' with inequality solver
http://code.google.com/p/sympy/issues/detail?id=3191
In [230]: a = (-2*alpha + 7)
In [231]: b = alpha**2 - 7*alpha + 10
In [232]: c = -5*alpha**2 + 5*alpha
In [233]: solve([a>0, b>0, c>0, a*b>c])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython-input-233-1e9167f691f3>
in
<module>()
----> 1 solve([a>0, b>0, c>0, a*b>c])
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/solvers/solvers.py in
solve(f, *symbols, **flags)
607 elif isinstance(fi, bool) or fi.is_Relational:
608 return reduce_inequalities(f,
assume=flags.get('assume'),
--> 609 symbols=symbols)
610 # Any embedded piecewise functions need to be brought out
to the
611 # top level so that the appropriate strategy gets selected.
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/solvers/inequalities.py
in
reduce_inequalities(inequalities, assume, symbols)
418
419 for gen, exprs in poly_part.iteritems():
--> 420 poly_reduced.append(reduce_poly_inequalities([exprs], gen,
assume))
421
422 for gen, exprs in abs_part.iteritems():
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/solvers/inequalities.py
in
reduce_poly_inequalities(exprs, gen, assume, relational)
212
213 if not real:
--> 214 result = And(solution.as_relational(re(gen)), Eq(im(gen),
0))
215 else:
216 result = solution.as_relational(gen)
AttributeError: 'Intersection' object has no attribute 'as_relational'
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.