-
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
[Speculative] Recursively look for names inside wrapper types #20
base: master
Are you sure you want to change the base?
Conversation
# things that are not wrapper arrays are there own parents, | ||
# so at that point we can give up looking for names | ||
# also we have no way to deal with inner arrays of different dimensions, even if they do have names | ||
# so give up then too |
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.
maybe helpful to add an example (cos it's a bit of a weird case)? e.g.
also parent arrays can have a different number of dimensions, e.g. parent of a
Diagonal
is aVector
we have no way to deal with the names in this case so give up then too
end | ||
end | ||
names(x::Array{T,N}) where {T,N} = default_names(x) # shortcut of the above | ||
default_names(x::AbstractArray{T, N}) where {T,N} = ntuple(_->:_, N) |
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.
Are these really the names of an un-named thing?
Aren't these the names of something which has names, they're just unknown/wildcards
The names of an unnamed thing is nothing
or maybe ntuple(i -> nothing, N)
?
I like this as an idea, although I disagree with assigning names (even wildcards) to non-named things. We should only gain wildcards if we cannot know the appropriate new name(s) for a previously named thing |
idk if this is a good idea,
Goal would be for better handling of things like
LowerTriangular{<:NamedDimsArray}