Mercurial > repos > public > sbplib_julia
diff src/Grids/equidistant_grid.jl @ 1399:adbdbf1c3480 bugfix/grids/complete_interface_impl
Replace `firstindex` and `lastindex` with implementation of `axes`
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 22 Aug 2023 09:00:34 +0200 |
parents | d2219cc8316b |
children | e3a80ef08d09 |
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl Tue Aug 22 08:59:47 2023 +0200 +++ b/src/Grids/equidistant_grid.jl Tue Aug 22 09:00:34 2023 +0200 @@ -20,8 +20,7 @@ Base.firstindex(g::EquidistantGrid) = firstindex(g.points) Base.lastindex(g::EquidistantGrid) = lastindex(g.points) -Base.firstindex(g::EquidistantGrid, d) = firstindex(g) -Base.lastindex(g::EquidistantGrid, d) = lastindex(g) +Base.axes(g::EquidistantGrid, d) = axes(g.points, d) # Iteration interface Base.iterate(g::EquidistantGrid) = iterate(g.points)