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

Solves issue with Range 16817 #16820

Merged
merged 2 commits into from May 13, 2019
Merged

Solves issue with Range 16817 #16820

merged 2 commits into from May 13, 2019

Conversation

ritesh99rakesh
Copy link
Member

@ritesh99rakesh ritesh99rakesh commented May 13, 2019

References to other Issues or PRs

Fixes #16817

Brief description of what is fixed or changed

Replaces 0 with S.Zero and 1 with S.One in sympy/sets/fancysets.py
Latex is now giving correct results.

Other comments

Release Notes

  • sets
    • arguments of null Range(0, 0, 1) are now Integers (solves printing problem)

@sympy-bot
Copy link

sympy-bot commented May 13, 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:

  • sets
    • arguments of null Range(0, 0, 1) are now Integers (solves printing problem) (#16820 by @ritesh99rakesh)

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 #16817 

#### Brief description of what is fixed or changed
Replaces 0 with S.Zero and 1 with S.One in `sympy/sets/fancysets.py`
Latex is now giving correct results.

#### Other comments


#### 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 -->
- sets
    - arguments of null Range(0, 0, 1) are now Integers (solves printing problem)
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@smichr
Copy link
Member

smichr commented May 13, 2019

Looks good; even better with a test from the issue which raised an error in master.

@codecov
Copy link

codecov bot commented May 13, 2019

Codecov Report

Merging #16820 into master will increase coverage by 0.007%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##            master    #16820       +/-   ##
=============================================
+ Coverage   73.847%   73.855%   +0.007%     
=============================================
  Files          619       619               
  Lines       159669    159669               
  Branches     37476     37476               
=============================================
+ Hits        117912    117924       +12     
+ Misses       36297     36280       -17     
- Partials      5460      5465        +5

@ritesh99rakesh
Copy link
Member Author

@smichr Please review this.

@smichr
Copy link
Member

smichr commented May 13, 2019

Please review this.

already did :-)

@smichr
Copy link
Member

smichr commented May 13, 2019

a good non-latex test would be just assert all(i.is_Integer for i in Range(0, -1, 1)) in the file testing Range.

@sylee957 sylee957 added the sets label May 13, 2019
@ritesh99rakesh
Copy link
Member Author

@smichr I have added the test, please let me know if anything else is needed.

@smichr
Copy link
Member

smichr commented May 13, 2019

+1;
will commit when tests pass

@smichr smichr merged commit 72e0156 into sympy:master May 13, 2019
@ritesh99rakesh ritesh99rakesh deleted the 16817 branch May 13, 2019 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some issues with Range
4 participants