diff src/Grids/equidistant_grid.jl @ 1877:21e5fe1545c0 refactor/lazy_tensors/elementwise_ops

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 27 Jan 2025 16:56:04 +0100
parents 516eaabf1169
children edee7d677efb f93ba5832146
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl	Fri Jan 10 19:45:11 2025 +0100
+++ b/src/Grids/equidistant_grid.jl	Mon Jan 27 16:56:04 2025 +0100
@@ -15,7 +15,7 @@
 end
 
 # Indexing interface
-Base.getindex(g::EquidistantGrid, i) = g.points[i]
+Base.getindex(g::EquidistantGrid, i::Int) = g.points[i]
 Base.eachindex(g::EquidistantGrid) = eachindex(g.points)
 Base.firstindex(g::EquidistantGrid) = firstindex(g.points)
 Base.lastindex(g::EquidistantGrid) = lastindex(g.points)
@@ -71,8 +71,8 @@
 boundary_identifiers(::EquidistantGrid) = (LowerBoundary(), UpperBoundary())
 boundary_grid(g::EquidistantGrid, id::LowerBoundary) = ZeroDimGrid(g[begin])
 boundary_grid(g::EquidistantGrid, id::UpperBoundary) = ZeroDimGrid(g[end])
-boundary_indices(g::EquidistantGrid, id::LowerBoundary) = (firstindex(g),)
-boundary_indices(g::EquidistantGrid, id::UpperBoundary) = (lastindex(g),)
+boundary_indices(g::EquidistantGrid, id::LowerBoundary) = firstindex(g)
+boundary_indices(g::EquidistantGrid, id::UpperBoundary) = lastindex(g)
 
 """
     refine(g::EquidistantGrid, r::Int)