-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Range can be accepted in Sum #16810
Range can be accepted in Sum #16810
Conversation
✅ Hi, I am the SymPy bot (v147). 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.5. 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.
Update The release notes on the wiki have been updated. |
@smichr I have tried to fix it, can you please take a look and tell me whether it is merge-able. |
Codecov Report
@@ Coverage Diff @@
## master #16810 +/- ##
=============================================
+ Coverage 73.844% 73.844% +<.001%
=============================================
Files 619 619
Lines 159617 159635 +18
Branches 37463 37468 +5
=============================================
+ Hits 117868 117882 +14
Misses 36289 36289
- Partials 5460 5464 +4 |
Looks good. One mod that can be made in future prs is to remove the sympify of the Tuple V flatten result since all Tuple args are Basic. |
Let's make this canonical, however, by using lo=inf hi=sup and d=abs of step. Range(9,0,-2) should give same symbolic sum of i before doit as that of Range(1,10,2). |
Thank you @smichr for making the commits. :-) |
Hmm. That code is a little contorted. It should now work if you pass an Idx with Range. I'm not sure what should happen if lo and hi are not given with Idx, however, so am raising an error. |
Sure, we can add a TODO task for that case in the code. |
One more time... |
Do you have any popcorn? ;-) |
Up for a movie then? 😉 |
@smichr Tests passed. Is there anything else to change? |
No, LOL! |
References to other Issues or PRs
Fixes #16806
Brief description of what is fixed or changed
Read the discussion at the above Issue and see the diff.
Other comments
N/A
Release Notes
Range
can be passed as limit toSum