New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solveset_real need to check symbol in piecewise-condition.Expression with multiple abs ,having Piecewise solution as 0 #10550
base: master
Are you sure you want to change the base?
Conversation
Conflicts: sympy/solvers/tests/test_solveset.py
for (expr, in_set) in expr_set_pairs: | ||
solns = solveset_real(expr, symbol).intersect(in_set) | ||
result = result + solns | ||
expr_cond = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just write expr_cond = dict(f.args)
?
@@ -304,7 +304,40 @@ def test_piecewise_solve(): | |||
(-x + 2, x - 2 <= 0), (x - 2, x - 2 > 0)) | |||
assert solve(g, x) == [5] | |||
|
|||
# See issue 4352 (enhance the solver to handle inequalities). | |||
|
|||
def test_piecewise_solveset(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the solveset test suite; you aren't testing Piecewise, you are testing how solveset handles it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found test case for solve
just above so copied the same cases for solveset to check it is working correctly or not.
I have shifted the both testcases.
Also, see comment on line 490. |
I changed the |
Why is
|
Because it went through a major overhaul. It, and |
I spent hours for these PRs. I did similar thing with |
For this PR, yes. It looks like the other one is already closed. |
2476407
to
79bd2c2
Compare
@smichr , please review once. |
Fixes #10122 and #10534
To fix the Assertion Error of piecewise test-case in PR #10502
need changes of PR #10547
I merged that PR branch into this.