DEP: Proposal to deprecate the msort
convenience function
#22456
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
msort
function, 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 ofmsort
being used.msort
is found in astropy in theunits
subpackage 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.