Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10.9k
TYP: deprecatema.round_
#28917
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
TYP: deprecatema.round_
#28917
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
becauseround
aliasesround_
, you're also deprecatingnp.ma.round
with this
for reference:#28899 (review) |
I’ve removed the@deprecated decorator from round_ as suggested since it also deprecates round. Added a note in the stub file to clarify. Please let me know if further changes are needed! |
I’ve removed the@deprecated decorator from round_ as suggested since it also deprecates round. Added a note in the stub file to clarify. Please let me know if further changes are needed! |
That's not what I meant actually: |
why are there two PRs now? this makes more sense in the PR you already have open... |
…serve non-deprecated behavior
Added@deprecated("np.ma.round_ is deprecated. Please use np.round instead.") above the round_ function. Kept round function unchanged and added a comment noting it's retained for compatibility. |
@ngoldbaum You're right, and thanks for pointing that out. I initially opened this separate PR to isolate the deprecation change for ma.round_ and keep it focused based on the feedback. But I now realize it would have been better to update the existing PR instead of opening a new one |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
Remove redundant comments as per review |
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
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.
merging this should wait until after#28899
Uh oh!
There was an error while loading.Please reload this page.
@jorenham
Added
@deprecated
decorator toma.round_
stub in core.pyi and importeddeprecated
fromtyping_extensions
to fixed