Skip to content
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

Simplify: Fixes IndexError using cse with RootOf #18273

Merged
merged 6 commits into from
Jan 9, 2020

Conversation

sachin-4099
Copy link
Contributor

@sachin-4099 sachin-4099 commented Jan 9, 2020

Fixes #18203

Initially:

In [1]: eq = CRootOf(x**5 + 11*x - 2, 0) + CRootOf(x**5 + 11*x - 2, 1)
In [2]: cse(eq)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-3-cf150e6c3960> in <module>
----> 1 cse(eq)

Now the issue is fixed.

Testcase has also been added.

  • simplify
    • Fixed IndexError using cse with RootOf

@sympy-bot
Copy link

sympy-bot commented Jan 9, 2020

Hi, I am the SymPy bot (v149). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.6.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

Fixes #18203 

**Initially:**

`In [1]: eq = CRootOf(x**5 + 11*x - 2, 0) + CRootOf(x**5 + 11*x - 2, 1)`
`In [2]: cse(eq)`
`---------------------------------------------------------------------------`
`IndexError                                Traceback (most recent call last)`
`<ipython-input-3-cf150e6c3960> in <module>`
`----> 1 cse(eq)`

Now the **issue is fixed**.

**Testcase has also been added.**

<!-- BEGIN RELEASE NOTES -->
* simplify
   *  Fixed IndexError using cse with RootOf

<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@sachin-4099
Copy link
Contributor Author

Please review the PR @jksuom @oscarbenjamin.
If any changes are required please suggest
Otherwise the PR is ready to be merged.

@codecov
Copy link

codecov bot commented Jan 9, 2020

Codecov Report

Merging #18273 into master will increase coverage by 0.174%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##            master    #18273       +/-   ##
=============================================
+ Coverage   74.817%   74.991%   +0.174%     
=============================================
  Files          638       649       +11     
  Lines       166312    167382     +1070     
  Branches     39111     39394      +283     
=============================================
+ Hits        124431    125523     +1092     
+ Misses       36358     36317       -41     
- Partials      5523      5542       +19

@jksuom
Copy link
Member

jksuom commented Jan 9, 2020

Thanks, this looks good.

@jksuom jksuom merged commit c31a29a into sympy:master Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IndexError using cse with RootOf
3 participants