I want to loop over a matrix that might have custom indices. I can use
axes(a) to get these. But I need a step size other than 1.
Is there a simple, generic way of converting Base.OneTo to a StepRange with a step other than 1 besides just doing it manually?
It would be good to have a helper method for this, I can’t imagine why else you would need to convert anything to a step range except to have a step size other than 1!
Something like this could convert
axes(a) to StepRanges with a step size 2: