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

Range can be accepted in Sum #16810

Merged
merged 12 commits into from May 12, 2019

Conversation

Projects
None yet
4 participants
@czgdp1807
Copy link
Member

commented May 11, 2019

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

  • concrete
    • Range can be passed as limit to Sum
@sympy-bot

This comment has been minimized.

Copy link

commented May 11, 2019

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.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests . Please also
write a comment on that issue linking back to this pull request once it is
open. -->
Fixes https://github.com/sympy/sympy/issues/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

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* concrete
  * `Range` can be passed as limit to `Sum`
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@czgdp1807

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

@smichr I have tried to fix it, can you please take a look and tell me whether it is merge-able.

@codecov

This comment has been minimized.

Copy link

commented May 11, 2019

Codecov Report

Merging #16810 into master will increase coverage by <.001%.
The diff coverage is 90%.

@@              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

czgdp1807 added some commits May 11, 2019

@smichr

This comment has been minimized.

Copy link
Member

commented May 11, 2019

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.

@smichr

This comment has been minimized.

Copy link
Member

commented May 11, 2019

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).

smichr added some commits May 12, 2019

@czgdp1807

This comment has been minimized.

Copy link
Member Author

commented May 12, 2019

Thank you @smichr for making the commits. :-)

smichr added some commits May 12, 2019

@smichr

This comment has been minimized.

Copy link
Member

commented May 12, 2019

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.

@czgdp1807

This comment has been minimized.

Copy link
Member Author

commented May 12, 2019

Sure, we can add a TODO task for that case in the code.

@smichr

This comment has been minimized.

Copy link
Member

commented May 12, 2019

One more time...

@sylee957 sylee957 added the concrete label May 12, 2019

smichr added some commits May 12, 2019

@smichr

This comment has been minimized.

Copy link
Member

commented May 12, 2019

Do you have any popcorn? ;-)

@czgdp1807

This comment has been minimized.

Copy link
Member Author

commented May 12, 2019

Up for a movie then? 😉

@czgdp1807

This comment has been minimized.

Copy link
Member Author

commented May 12, 2019

@smichr Tests passed. Is there anything else to change?

@smichr smichr merged commit 0d6198b into sympy:master May 12, 2019

3 checks passed

codecov/project 73.844% (target 0%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
sympy-bot/release-notes The release notes look OK
Details
@smichr

This comment has been minimized.

Copy link
Member

commented May 12, 2019

No, LOL!

@czgdp1807 czgdp1807 deleted the czgdp1807:addon_sum_api branch May 12, 2019

@czgdp1807 czgdp1807 added the GSoC label Jun 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.