Mercurial > repos > public > sbplib_julia
diff src/Grids/grid.jl @ 1624:888e4092e2ed
Add missing type annotation in src/Grids/grid.jl for ArrayComponentView
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 11 Jun 2024 21:43:01 +0200 |
parents | b459082533f7 |
children | 5f348cc5598e b02917bcd7d5 |
line wrap: on
line diff
--- a/src/Grids/grid.jl Mon Jun 10 22:39:22 2024 -0700 +++ b/src/Grids/grid.jl Tue Jun 11 21:43:01 2024 +0200 @@ -74,7 +74,7 @@ end end -Base.size(cv) = size(cv.v) +Base.size(cv::ArrayComponentView) = size(cv.v) Base.getindex(cv::ArrayComponentView, i::Int) = cv.v[i][cv.component_index...] Base.getindex(cv::ArrayComponentView, I::Vararg{Int}) = cv.v[I...][cv.component_index...] IndexStyle(::Type{<:ArrayComponentView{<:Any,<:Any,AT}}) where AT = IndexStyle(AT)