It would be great to have the ability to do the following:
Main> a = AxisArray(randn(10,10,5), :x, :y, :time);
Main> timeaxis(a)
AxisArrays.Axis{:time,Base.OneTo{Int64}}(Base.OneTo(5))
Main> for timepoint in timeaxis(a)
println(timepoint)
end
ERROR: MethodError: no method matching start(::AxisArrays.Axis{:time,Base.OneTo{Int64}})
Closest candidates are:
start(::SimpleVector) at essentials.jl:258
start(::Base.MethodList) at reflection.jl:560
start(::ExponentialBackOff) at error.jl:107
...
Stacktrace:
[1] anonymous at ./<missing>:?
[2] eval(::Module, ::Any) at ./boot.jl:235
That would be the most intuitive method for me to iterate over slices along an axis.
My current solution is way uglier and more fragile
for timepoint in 1:size(exp_img)[axisdim(exp_img, Axis{:time}())]
println(timepoint)
end
It would be great to have the ability to do the following:
That would be the most intuitive method for me to iterate over slices along an axis.
My current solution is way uglier and more fragile