-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support named dims for dims
keyword argument
#20
Comments
"Not having named dims limits the usefulness of using a KeyedArray as opposed to just an AbstractArray" |
I personally vote that adding the dependency on some of the underlying packages might be worth having named dims for |
Are named |
I don't have a good sense of the cost of adding the dependency. On the face of it, it seems worthwhile if we can't find any other non-hack way. |
They are not in fact. We've added explicit tests in #62 |
To use a consistent convention for
dims
(#18), we currently have to "invert" the value passed into thedims
keyword argument to the array-basedapply!
, so thateachslice
gives the expected result. For exampledims=2
becomesdims=1
anddims=3
becomesdims=[1, 2]
. Basically we can usesetdiff(1:ndims(array), dims)
to accomplish that.The solution isn't so straightforward for named dims, because the method to get the list of dim names is not universal.
KeyedArray
supportsdimnames(A)
butAxisArray
does not, instead usingaxisnames
. One workaround isdimnames(wrapdims(::AxisArray))
but that requires addingAxisKeys
as a dependency.Some have suggested that support for
AxisArrays
should be dropped entirely, or included in an auxiliary package - then we could rely ondimnames
.The text was updated successfully, but these errors were encountered: