-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for np.partition #3320
Merged
Merged
Support for np.partition #3320
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
45423a7
initial commit
rjenc29 849a2ce
handle invalid kths
rjenc29 9adad60
lots of tests
rjenc29 44a3d6f
reduce search space for subsequent pivots
rjenc29 3869e06
update travis
rjenc29 dc8170e
minor refinements
rjenc29 cba8568
added some comments
rjenc29 f4cf6fb
Merge branch 'master' into partition
rjenc29 b03cc56
Merge branch 'master' into partition
rjenc29 d68de2f
np.partition speedup
rjenc29 3cf00b2
Merge branch 'master' into partition
rjenc29 888103e
factories for select and partition
rjenc29 8df9811
use seeded rng in tests
rjenc29 bbdd731
use a.size to determine if a is empty
rjenc29 380f301
take out branching in initial kth validation
rjenc29 8e9301b
checks for validity of a and add tests
rjenc29 ebd6e61
add sanity check versus numpy
rjenc29 a0544c5
add comment to ref NumPy tests
rjenc29 821f060
handle boolean inputs
rjenc29 511faa7
handle multi-dimensional kth and make exception messages more intelli…
rjenc29 2e3f111
reorder checks
rjenc29 614fcb8
relocate comment
rjenc29 6293617
additional test and rename variable
rjenc29 8ee1adb
merge master
rjenc29 bc83639
fix mismerge - variable rename and additional tests
rjenc29 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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.
I think
a
needs to be put through_asarray
. Without this asking for array attrs ona
is an error. Also see my note on type legalization above.As an aside, it's weird in NumPy that this is valid:
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.
Agreed, now using _asarray.
Those two edge cases are pretty weird - I added them explicitly to check the behaviour is equivalently weird.