Implement `axes` and `iterate`
Opened this issue · 6 comments
giordano commented
This package currently implements only the basic AbstractArray
interface, but not the optional methods such as iterate
or axes
, which leads to some funny (and wrong) results.
giordano commented
mkitti commented
axes
is supposed to return
a tuple of AbstractUnitRange{<:Integer} of valid indices
giordano commented
How do you think you can do a AbstractUnitRange{<:Integer}
for this indexing?
mkitti commented
I'm just quoting @mbauman here
https://discourse.julialang.org/t/offsetarrays-inbounds-and-confusion/81295/50
mkitti commented
I suppose that axes
only has to return valid indices. They do not have to be in iteration order.
jariji commented
They do not have to be in iteration order.
Can't we just add that requirement to the AbstractArray docs? It seems like a complication and I'm not seeing much advantage.