DEP: Proposal to deprecate the msort convenience function#22456
Merged
mattip merged 5 commits intonumpy:mainfrom Oct 20, 2022
Merged
DEP: Proposal to deprecate the msort convenience function#22456mattip merged 5 commits intonumpy:mainfrom
msort convenience function#22456mattip merged 5 commits intonumpy:mainfrom
Conversation
mattip
reviewed
Oct 20, 2022
mattip
approved these changes
Oct 20, 2022
Member
mattip
left a comment
There was a problem hiding this comment.
one small nit about formatting the warning, otherwise LGTM
Add date to deprecation in comment Co-authored-by: Matti Picus <[email protected]>
Member
|
Thanks @rossbar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a proposal to deprecate the
msortfunction, which is currently exposed in the main numpy namespace. The function is a convenience function for performing a sort along the 0-th axis:numpy/numpy/lib/function_base.py
Lines 3677 to 3679 in 7776bc6
which can be accomplished more idiomatically with
np.sort(a, axis=0).Re: impact assessment per NEP 23 - I have grepped through other major scientific Python libraries (
scipy,matplotlib,scikit-image,scikit-learn,networkx) and there were no instances ofmsortbeing used.msortis found in astropy in theunitssubpackage in a listing of subclass-safe functions imported from numpy; though it does not appear to actually be used within astropy and should be straightforward to remove.