-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
ENH, API: New sorting mechanism for DType API #28516
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
Open
MaanasArora
wants to merge
54
commits into
numpy:main
Choose a base branch
from
MaanasArora:enh/faster-string-sorting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+791
−72
Open
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
87f410b
ENH: Allocate lock only once in StringDType quicksort
MaanasArora ecd3ee1
ENH: Add dtype slots for sorting and begin integration
MaanasArora 7e0bf44
MAINT: Rename sort compare slot access function
MaanasArora 45f5008
ENH: Add dtype slot sorting functionality support to all sort kinds
MaanasArora d235dc9
ENH: Add descending flag to internal sorting functions
MaanasArora 6a65c07
MAINT: Improve get dtype sort compare function name
MaanasArora 379022f
MAINT: Fix doc typo
MaanasArora 36fa05f
MAINT: Error out when non-legacy dtype has no sort_compare function
MaanasArora a7c6792
DOC: Add release notes for new dtype sorting API
MaanasArora 84e7421
DOC: Add doc for sort compare slot in release notes
MaanasArora 5caea7f
DOC: Add note for potential deprecation of sort arrfuncs in release note
MaanasArora f700725
MAINT: Reorder dtype slots to prevent changing existing slot numbers
MaanasArora e7cf5c2
BUG: Error on missing `sort_compare` slot only when dtype is privatel…
MaanasArora 21fb7e7
DOC: Add C-API documentation for new sorting slots
MaanasArora 9244ea3
ENH: Replace array object with context and auxdata in sortfunc signat…
MaanasArora 9f09b13
BUG: Fix unnecessarily private function call due to underscore typo
MaanasArora 7aeba26
MAINT: Fix whitespace typos
MaanasArora c7481b8
ENH: Allow flexible sorting compare for arr or descr in npy_sort func…
MaanasArora aa3415a
ENH: Add new sort func implementations and use in stringdtype
MaanasArora e725ed5
DOC: Fix missing newline in ctype doc
MaanasArora 6d0ba21
DOC: Add sortfunc typedef docs
MaanasArora 23204c5
DOC: Fix missing newline in ctype doc
MaanasArora ede3462
ENH: Define SortCompareFunc type
MaanasArora 889ee11
Update dtype sorting signatures: move context, move out auxdata to ge…
MaanasArora beba242
MAINT: Check error in Get(Arg)SortFunc using return value
MaanasArora 61e6f16
DOC: Add missing newlines to c-types in array.rst
MaanasArora 434005e
MAINT: Rename new sort funcs and restore older names for existing pub…
MaanasArora 3c168e4
MAINT: Rename start pointer in new sort func documentation to data
MaanasArora d9d9872
ENH: Add flags to new get_(arg)sort_function
MaanasArora a448475
DOC: Mention new sort func buffers to be contiguous
MaanasArora ab8f394
ENH: Elaborate new sort context, add reverse sorting and non position…
MaanasArora cd38b15
MAINT: Remove array from new sort context
MaanasArora dcc465a
DOC: Add `PyArrayMethod_SortContext` to docs
MaanasArora 30b6c9c
DOC: Move sort nan position enum to array.rst
MaanasArora 60d7f80
DOC: Add accidentally removed documentation for finalize_descr slot
MaanasArora 38e29e0
BUG: Fix context initiation in _new_(arg)sortlike
MaanasArora bbbd274
ENH: Add descending flag to SortContext
MaanasArora 178445d
MAINT: Pass descr in sort compare func and remove compare slot
MaanasArora 29cd764
MAINT: Remove name for only one parameter in typedef
MaanasArora 852783f
ENH: Add NumPy 2.4 API version and use for new sorting slots
MaanasArora 5aaa15f
ENH: Add error result to `NPY_COMPARE_RESULT` enum
MaanasArora 28e8c3a
DOC: Fix incorrectly changed arrfunc docs for sort functions
MaanasArora 6e65f8d
MAINT: Clearer names for NPY_SORT_NAN_POSITION members
MaanasArora 73bb5f8
DOC: Remove unimplemented release note
MaanasArora 5eca653
DOC: Document new-style sorts are always descending and nan to end
MaanasArora 9d3ae70
MAINT: Remove descending from get_sort_function and rename in sort co…
MaanasArora f46a498
DOC: Add version added directives to new sorting slots
MaanasArora b471562
BUG: Check return value of slots in GetSortFunction and GetArgSortFun…
MaanasArora d022a2d
DOC: Clarify that comparison function pointer can be NULL in sorting …
MaanasArora b1222b2
BUG: Use NPY_MIN_INT return value in compare_from_context to indicate…
MaanasArora 4d7d592
DOC: Add release note for new sort compare c-api change
MaanasArora b734527
DOC: Add `PyArray_SortCompareFunc` to array docs
MaanasArora 7d9ac65
DOC: Update sorting documentation with NPY_COMPARE_RESULT enum
MaanasArora c21a164
ENH: Add descending sorts to new `compare_from_context`
MaanasArora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
DOC: Add version added directives to new sorting slots
- Loading branch information
commit f46a49817b6052a1071fe77b83ad7b056e61d6fb
There are no files selected for viewing
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
Oops, something went wrong.
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.
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.
Add a
.. versionadded::
here. We don't have to strictly hide it, since it'll at least fail gracefully on older versions (at least I hope).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.
Done, thanks