Mercurial > repos > public > sbplib_julia
diff src/Grids/tensor_grid.jl @ 1427:26e168924cf1 feature/grids/curvilinear
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 23 Aug 2023 15:51:32 +0200 |
parents | 4d628c83987e |
children | 60857d8338cb |
line wrap: on
line diff
--- a/src/Grids/tensor_grid.jl Tue Jun 27 09:36:32 2023 +0200 +++ b/src/Grids/tensor_grid.jl Wed Aug 23 15:51:32 2023 +0200 @@ -17,7 +17,7 @@ end # Indexing interface -function Base.getindex(g::TensorGrid, I...) +function Base.getindex(g::TensorGrid, I::Vararg{Int}) szs = ndims.(g.grids) Is = LazyTensors.split_tuple(I, szs) @@ -26,8 +26,6 @@ return vcat(ps...) end -Base.getindex(g::TensorGrid, I::CartesianIndex) = g[Tuple(I)...] - function Base.eachindex(g::TensorGrid) szs = LazyTensors.concatenate_tuples(size.(g.grids)...) return CartesianIndices(szs)