-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Proposal for function uniqueslices #14142
Closed
Closed
Commits on Nov 25, 2015
-
Proposal for function uniqueind
This commit introduces a function `uniqueind` that is a slight modification of the existing `unique` function accepting a `dim` argument but returns an additional three index vectors. The outputs, as described in the docstring, are as follows: `C` - an array of the unique elements/rows/columns/hyperplanes of the input AbstractArray `itr` along the dimension `dim` `ia` - a vector of index values such that slice indexing into `itr`along dimension `dim` re-produces `C`. For example, if `itr` is a vector, `itr[ia] == C` returns `true` `ib` - a vector of vectors of integers, where each vector of integers contains the index positions of the unique elements/rows/columns/planes within `C` `ic` - a vector of index values such that slice indexing into `C` along dimension `dim` re-rproduces `itr` For example, if `itr` is a vector, `C[ic] == itr` returns `true` The presence of `ia`, `ib`, and `ic` are meant to mimic the behaviors (but with potentially different output order) of various unique and group functions found in a few other technical computing languages. This function provides all three of those outputs from a single function, while some other languages might only produce one or two arrays of index vectors from a given function. It might be decided upon review that instead of a single function returning all four outputs, there should be multiple functions that return separate output arguments and more closely mimic similar functions from other languages. This PR is in relation to issue #1845.
Configuration menu - View commit details
-
Copy full SHA for 6873024 - Browse repository at this point
Copy the full SHA 6873024View commit details -
Removing a trailing whitespace that caused a build failure.
Configuration menu - View commit details
-
Copy full SHA for 4d0a8c1 - Browse repository at this point
Copy the full SHA 4d0a8c1View commit details
Commits on Nov 26, 2015
-
Configuration menu - View commit details
-
Copy full SHA for d0b09ab - Browse repository at this point
Copy the full SHA d0b09abView commit details -
Configuration menu - View commit details
-
Copy full SHA for cdfd617 - Browse repository at this point
Copy the full SHA cdfd617View commit details
Commits on Nov 30, 2015
-
This commit makes the simple doc updates suggested in #14142 to change `itr` to `A` and use a fixed set of integers, instead of random integers, when constructing the multidimensional array examples.
Configuration menu - View commit details
-
Copy full SHA for 547600a - Browse repository at this point
Copy the full SHA 547600aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0779baf - Browse repository at this point
Copy the full SHA 0779bafView commit details
Commits on Dec 3, 2015
-
Changing function name to
uniqueslices
Updating function name to `uniqueslices` primarily just to kick off a new round of Travis and AppVeyor tests, because the Travis tests failed last time for reasons seemingly unrelated to the contents of this file.
Configuration menu - View commit details
-
Copy full SHA for 7fe7997 - Browse repository at this point
Copy the full SHA 7fe7997View commit details
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.