-
Notifications
You must be signed in to change notification settings - Fork 368
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
Make ByRow subtype Function #2212
Conversation
Thank you. Makes sense. Is it rebased against master (I have just merged #2199). If not can you please rebase? |
If we go for it also remove line |
done |
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.
Looks good. Thank you. @nalimilan - can you also have a quick look at this please?
@oxinabox - there is also one more Union
to clean-up here: https://github.com/JuliaData/DataFrames.jl/blob/master/src/groupeddataframe/splitapplycombine.jl#L1096
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.
Thanks!
Merged. Thank you! |
ByRow
is a function wrapper.Its callable, so it works like a function.
As such it is not unreasonable to for it to subtype
Function
Which means it is also covered by
Base.Callable
.Which means we can simplify some of the more complex type constraints.
(I noticed this because these get more complex in #2199 )
In general I think if something is callable and doesn't already have a supertype, it is a fairly good idea to make it subtype
Function
.(i would be in general a fan of dropping the constraints here entirely, but that would require closer looking at the code to see if it would cause any change in dispatch)