-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add pairwise convenience method for tables #123
base: master
Are you sure you want to change the base?
Conversation
Also add docstrings for pairwise and pairwise!.
I'm actually in favor of moving away from having a way to query if something is a |
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 really don't think this package should take on a Table.jl dependency. This seems like it should be in a package downstream that cares about Tables.
@quinnj OK. I was just asking about the best way to write the docstring, i.e. what's the standard expression to designate objects that are tables in the Tables.jl sense.
@KristofferC One of the big advantages of Tables.jl is that it's lightweight and generic, so adding a dependency on it doesn't cost much. To what other package could be add the few lines of code added by this PR? Creating TableDistances.jl just for that would be weird. Alternatively we could put this under |
I rather not increase the package load time by 20x. Just looking at the This package has worked very well and been easy to maintain because it has done a simple job (vectors in, distances out) and not taking on a bunch of "lightweight generic dependencies". |
This may have changed? I don't see an |
I get this now on Julia master: julia> @time using Distances
0.007964 seconds (8.20 k allocations: 698.664 KiB)
julia> @time using Tables
0.017526 seconds (20.52 k allocations: 1.489 MiB) So a dramatic improvement for both, but even more marked for Tables. |
Also add docstrings for
pairwise
andpairwise!
.It's great to see how simple this is thanks to Tables.jl. Better wait for JuliaData/Tables.jl#66 before merging though.
@quinnj What's the standard wording to describe "any type implementing the Tables.jl interface"? We should find a convention for it.