-
Notifications
You must be signed in to change notification settings - Fork 14
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
Used Base.names
#22
Comments
On the other hand, I'm not sure I'm against |
Errors.
My feelings exactly. |
I generally like |
I'm coming around to |
Is this a desirable feature that's just waiting for a pull request, or is it a no go? |
Yeah, I think lets make |
Any thoughts on I think I slightly prefer it. But I am also fine with |
+1 for giving the internal function I still think that in addition to this fix, we should also make |
I slightly prefer The problem with using |
I haven't reviewed this recently, but just on general principles I'd urge caution about supplying default names if the array doesn't already have them---my vote is to return |
Actually, that has convinced me in favour of I think this is nice/good: julia> nda = NamedDimsArray(rand(2, 3), (:r, :c));
julia> dim(nda, :c)
2
julia> dims(nda)
(:r, :c) I guess then maybe it'd also be nice to have: julia> dim(nda, 2)
:c |
Not suggesting changing it now, but julia> dim(nda, (:c, :r))
(2, 1) If the terminology is to call the integers dimensions, and the symbols names (or dimension names), then I think functions should follow what they return. |
So |
related #10 maybe this should be that is julia> nda = NamedDimsArray(rand(2, 3), (:r, :c));
julia> dims(nda)
(:r, :c)
julia> dims(nda, :c)
2
julia> dims(nda, 2)
:c
julia> dims(nda, (2, 1))
(:c , :r) |
It may make more sense for |
But every second function contains something like |
There is a tiering system of things that are hard in software engineering.
|
TBH I don't feel strongly at all about renaming
Given the potential complexity of default names in this package (how they're encoded internally, wild card names, etc.), perhaps it's best to just decide what the user facing API is (e.g., |
But #83 just renames Ah it also exports this function. Perhaps the question is whether the exported function should be this one with wildcards, or something else. |
Indeed. |
After some reflection, I think we should overload
Base.names
DataFrames does it, and we have a way better argument than they do.
The text was updated successfully, but these errors were encountered: