-
Notifications
You must be signed in to change notification settings - Fork 25
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
Argmin argmax skipnan #33
Merged
jturner314
merged 12 commits into
rust-ndarray:master
from
phungleson:argmin-argmax-skipnan
Mar 25, 2019
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2250a65
Implement argmin_skipnan
phungleson 7aa5e83
Implement argmax_skipnan
phungleson 4a7c178
Loosen the rule for argmin max related methods
phungleson 5f63c86
Make returning code clearer
phungleson f33f732
Add quickcheck for argmin_skipnan, argmax_skipnan
phungleson e602636
Use `fold` instead of `for`
phungleson 76d7201
Add indexed_fold_skipnan to MaybeNanExt
jturner314 6917d2f
Impl argmin/max_skipnan using indexed_fold_skipnan
jturner314 fd1104c
Fix argmin/max_skipnan quickcheck tests
jturner314 05b824b
Replace min/max.map with if for clarity
jturner314 a5c04f3
Merge pull request #1 from jturner314/indexed_fold_skipnan
phungleson c829d5d
Add () to make the match clearer
phungleson 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
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
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
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.
BTW, I wonder if it is better if we introduce
indexed_iter_skipnan
instead ofindexed_fold_skipnan
so that it can be used for different purposes, i.e.indexed_iter_skipnan().fold()
is one of the usecases.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 wouldn't mind adding
indexed_iter_skipnan()
in addition toindexed_fold_skipnan()
, but the semantics ofindexed_iter_skipnan().fold()
andindexed_fold_skipnan()
are a bit different. (I'd assume thatindexed_iter_skipnan()
would iterate in standard order to be consistent withindexed_iter()
, while I wouldn't assume that forindexed_fold_skipnan()
.)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.
Ah ok, I forgot about the order semantic, in that case, perhaps
indexed_iter_skipnan
can be added later when it has actual usecase, wdyt? is there anything you want me to look into before merging this?