I’d like to announce AxisIndices.jl. Briefly, AxisIndices implements a unique interface for indexing and offers a flexible approach to customizing indexing at each axis. The documentation currently provides brief explanations concerning code design and many docstrings with examples. Although this package is young it’s building on some well developed ideas and well used code. I’d also like to note that I’m trying to document and map a well defined path to 1.0. I expect most people interested in the package should be able to get started with the resources I’ve mentioned thus far (if not then please feel free to ask here or if appropriate please create an issue in the github repository). The rest of this post serves as a more informal explanation for why I made this package.
Here’s an example that demonstrates how it can be used for pretty printing.
A while back I found out AxisArrays was likely to be rewritten or superseded by another package in the future (see this). There were several shortcoming of AxisArrays that I kept bumping into so I quickly began participating in discussions concerning the development of alternatives (see this thread for a sample of the many discussions that have taken place). If you read those discussions you’ll find that one of the themes is a modular design where several packages do one thing well and then another package can bind them together to create something even better than AxisArrays. Some notable contributions towards creating solutions have included NamedDims, AxisRanges.jl, IndexedDims.jl, and DimensionalData.jl.
For a long time I contributed pieces of code and tried to involve as many people as I could in further developing solutions for this problem space. I’ve been particularly interested in solutions for the indexing component to AxisArrays. Thus far I’ve made packages that could contribute to a solution for this but wanted to avoid creating my own package because:
- There’s already several solutions being developed. Although there is something to be said for exploring multiple solutions, I was concerned that too many different approaches would divide developer attention too much for any single solution to reach sufficient maturity.
- There are a lot of very intelligent people in the Julia community that could create this package. My interest in programming is secondary to how it can further my area of research (neuroscience). Therefore, I usually prefer to be a regular contributor than a maintainer for these sorts of projects.
However, I recently realized two things:
- The indexing component involves so many different fields (e.g., time analysis, geospatial computing, image analysis, data munging, etc.) that it would be difficult (if not impossible) to reach a completely unified solution for every situation. This means there would either have to be many independent solutions or a single solution that was very generic and flexible. The last option sounded more like Julia and more likely to result in people being invested in a maintainable solution.
- Over time I’ve generated a bunch of code that if bound together in a package might start to resemble this solution with fairly little generation of new code.
So I started putting it together at the beginning of February, spending most of my spare time writing documentation and examples for this package. Whenever there was ambiguity over how a method should behave (e.g.,
append!) I tried to achieve a sensible default while implementing as many logical points of intervention so that others could alter how a method acts without redesigning everything. I’ve also tried to get as many of the tests into the documentation so that the intended results of each method are readily known by users.
AxisIndices is intended to package a fairly comprehensive set of tools for customizing indexing. After achieving v1.0 I expect changes to be focused mainly on further improving performance and easing customization of indexing. Integration with other packages and implementation of more specialized behavior will likely be pursued in separate packages so that AxisIndices remains as light weight and maintainable as possible. As a point of reference concerning integration with other packages people may be interested in this early effort to bind AxisIndices, NamedDims, and ImageCore.
Ultimately, I want this to be something that benefits the Julia community and look forward to working with others to achieve this.