-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
CLN: prepare unifying hashtable.factorize and .unique; add doc-strings #22986
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
640162f
Fix ASV import error
h-vetinari 31d0dc5
Add return_inverse to hashtable.unique
h-vetinari c5e5147
Pure copy/paste: Group unique/factorize functions next to each other
h-vetinari 9918d52
Unify hashtable.factorize and .unique
h-vetinari 52ae84e
Force compilation of different code paths
h-vetinari dbe4e0e
Add separate functions for return_inverse=False
h-vetinari 8481e19
Finish split in _unique_with_inverse and _unique_no_inverse
h-vetinari 27ceb4d
Add cython.wraparound(False)
h-vetinari f5cd5e9
Merge remote-tracking branch 'upstream/master' into re_factor_ize
h-vetinari b1705a9
Unmove unique-implementation (review jreback)
h-vetinari a6ed5dd
Undo line artefacts
h-vetinari 17752ce
Merge remote-tracking branch 'upstream/master' into re_factor_ize
h-vetinari 19eaf32
Clean up test_algos.test_vector_resize
h-vetinari ce7626f
Add test for hashtable.unique (esp. for return_inverse=True)
h-vetinari 7b9014f
Review (jreback)
h-vetinari 471c4da
Fix typo
h-vetinari 9d45378
Small fixes
h-vetinari 00b2ccb
Review (jorisvandenbossche)
h-vetinari 8687315
Merge remote-tracking branch 'upstream/master' into re_factor_ize
h-vetinari a267d4a
Review (jorisvandenbossche)
h-vetinari 7f1bb40
Improve comment
h-vetinari 9593992
Test for writable; expand comments
h-vetinari 08d7f50
Simplify factorize test
h-vetinari d91be98
Add simple test
h-vetinari e27ec9a
Tiny fixes
h-vetinari d825be0
Remove idx_duplicated from test (now unnecessary)
h-vetinari 1a342d0
Review (jreback)
h-vetinari 28e0441
Merge remote-tracking branch 'upstream/master' into re_factor_ize
h-vetinari d65e4fd
Merge remote-tracking branch 'upstream/master' into re_factor_ize
h-vetinari bca615c
Merge remote-tracking branch 'upstream/master' into re_factor_ize
h-vetinari 3438727
Review (jreback)
h-vetinari facc111
Merge remote-tracking branch 'upstream/master' into re_factor_ize
h-vetinari 6d0e86b
Retrigger Circle
h-vetinari 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
Review (jorisvandenbossche)
- Loading branch information
commit a267d4a2e872a48986b35c771814fdf8617b0792
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
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
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
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 would rather you not test unrelated things directly here; these are pure unit tests
it just makes the test confusing. add with the other duplicated tests if you must
though i think these are already well covered, but if not you can add
Uh oh!
There was an error while loading. Please reload this page.
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.
This is not unrelated - it's the central functionality of
factorize, and a bit more thorough than the few hand-made tests further up.The code for
duplicatedis completely separate (in cython) and so this should have a separate test as well IMOThere 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 know you really want to show that this works, but these tests need hard coded expectations. It is very hard for a reader to assert what you are doing, because you are computing the results here as well. I think its pretty easy to cook an example where you start with a duplicated array and just can assert the results directly. We do lots of these kinds of things already in the drop_duplicates testing.