I’m aware of at least seven different packages trying to add the capability to name dimensions of an array to Julia – AxisArrays, NamedDims, AxisKeys, AxisIndices, NamedArrays, LabelledArrays, and IndexedDims. Suffice it to say, I think this functionality is in very high demand from the community. At the same time, having seven different packages trying to do the same thing creates a headache for developers trying to figure out what the differences are and how to deal with user inputs from all of these. It seems like there’s a great opportunity to fix a lot of these headaches by adding this functionality to Base.
The fact that there are seven competing packages is perhaps an indication that there are tradeoffs to be made, or that people just can’t agree on the best design. If any of those are true, the functionality is perhaps not fit for for base and is better placed in packages where users can choose what suits them best?
Yes, the fragmentation is partly because people have slightly different ideas of how this should work. And partly because it’s too easy to make another package to prototype whatever idea you just had… And partly because AxisArrays has been a bit abandoned (e.g. it never got upgraded for Julia 1.0’s broadcasting). Agree it’s not a great state of affairs though. I’m not sure these differences are so wide that they couldn’t converge to one thing, and then kill all these prototypes.
While I’m not sure that has to be in Base, a minimal set of helpful changes to Base would be:
- More functions should pass
axesalong. This would help extend OffsetArrays, too.
- There should be some
to_dims(A, dims)function called whenever a
dimskeyword is used, much like
to_index(A, inds...)is used to standardise all indexing.
I think ArrayInterface.jl is prototyping instead a maximal set of changes. (Among other ideas.) If that were put into Base, it would I think move much more of the logic there.