I'm not fully sure what's needed to enable Axisdims, perhaps overloading Base.mapslices directly since it seems to assume the dims args are always integers (used for indexing).
julia> mapslices(sum, A; dims=Axis{:y})
ERROR: ArgumentError: invalid index: Axis{:y,T} where T of type UnionAll
Stacktrace:
[1] to_index(::Type{T} where T) at ./indices.jl:297
[2] to_index(::Array{Any,1}, ::Type{T} where T) at ./indices.jl:274
[3] to_indices at ./indices.jl:325 [inlined]
[4] to_indices at ./indices.jl:322 [inlined]
[5] setindex!(::Array{Any,1}, ::Base.Slice{Base.OneTo{Int64}}, ::Type{T} where T) at ./abstractarray.jl:1153
[6] mapslices(::typeof(sum), ::AxisArray{Int64,2,Array{Int64,2},Tuple{Axis{:y,Base.OneTo{Int64}},Axis{:x,Base.OneTo{Int64}}}}; dims::Type{T} where T) at ./abstractarray.jl:2078
[7] top-level scope at REPL[203]:1
Somewhat closes #193 as it only accepts integer
dims
.I'm not fully sure what's needed to enable
Axis
dims
, perhaps overloadingBase.mapslices
directly since it seems to assume thedims
args are always integers (used for indexing).