Mercurial > repos > public > sbplib_julia
diff src/Grids/tensor_grid.jl @ 1394:60857d8338cb bugfix/grids/complete_interface_impl
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 15 Aug 2023 22:45:58 +0200 |
parents | 9da927271752 4d628c83987e |
children | adbdbf1c3480 |
line wrap: on
line diff
--- a/src/Grids/tensor_grid.jl Tue Aug 15 22:40:50 2023 +0200 +++ b/src/Grids/tensor_grid.jl Tue Aug 15 22:45:58 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)