-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Change the logic of the eval method present in RoundFunction Class (integers.py) #18424
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
Conversation
|
✅ 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.
Update The release notes on the wiki have been updated. |
|
This needs tests. |
|
Can you check the changes if they seems right to you? |
| v = cls._eval_number(arg) | ||
| if v is not None: | ||
| return v | ||
|
|
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 think there should only be one blank line here
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 just removed it.
|
I think |
Codecov Report
@@ Coverage Diff @@
## master #18424 +/- ##
=============================================
+ Coverage 75.312% 75.334% +0.021%
=============================================
Files 635 638 +3
Lines 167042 167123 +81
Branches 39417 39418 +1
=============================================
+ Hits 125804 125901 +97
+ Misses 35703 35684 -19
- Partials 5535 5538 +3 |
|
Please be more descriptive in your pull request descriptions. Every function in SymPy has an |
Sure I will keep that in mind always from now on :) |
|
Ping @sylee957 @oscarbenjamin |
| v = cls._eval_number(arg) | ||
| if v is not None: | ||
| return v | ||
| from sympy import im |
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 think that the import should be at the top of the method. Also perhaps there should be a blank line after return v.
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.
Pay attention to things like line spacing when editing the code. Look at the code around and try to match the style
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.
Sorry I will not overlooked these things from now on
|
The release note should be something like "floor and ceiling with float arguments now return Integers" |
|
Looks good. |
References to other Issues or PRs
Fixes #18421
Brief description of what is fixed or changed
floor(float(0))now give 0 instead of0.0andceiling(float(0))now gives 0 instead of0.0.I have Called the _eval_number first in the eval method present in RoundFunction Class which is present in functions/elementary/integers.py
Other comments
Release Notes