Conversation
src/abstractdataframe/join.jl
Outdated
| r1, r2 = size(df1, 1), size(df2, 1) | ||
| cols = [[rep(c, 1, r2) for c in columns(df1)]; | ||
| [rep(c, r1, 1) for c in columns(df2)]] | ||
| cols = [[c[repeat(collect(1:length(c)), inner=[r2])] for c in columns(df1)]; |
Member
Author
There was a problem hiding this comment.
The new code isn't as clean as the old one here since repeat only works for Array until JuliaLang/julia#14082 is merged. Not sure we could backport it to 0.4 or have a version in Compat.jl. It's not terrible anyway.
Member
Author
There was a problem hiding this comment.
The new repeat was backported in Compat, which allowed cleaning the code.
2815a07 to
38c122d
Compare
This function lives in DataArrays and is mostly redundant with Base.repeat(). Use the latter where possible, or custom code when not, so that we can deprecate rep(). Use Compat.repeat() since Base.repeat() only works with Array on 0.4.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This function lives in DataArrays and is mostly redundant with
Base.repeat(). Use the latter where possible, or custom code
when not, so that we can deprecate rep().
Cf. JuliaStats/DataArrays.jl#186.