Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ end
return any(index -> index <: StaticVector{<:Any,Bool}, indices.parameters)
end

function Base.view(
@propagate_inbounds function Base.view(
a::MArray{S},
indices::Union{Integer, Colon, StaticVector, Base.Slice, SOneTo}...,
) where {S}
Expand Down
2 changes: 1 addition & 1 deletion src/SizedArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ end
return Tuple{prod_size}
end

function Base.view(
@propagate_inbounds function Base.view(
a::SizedArray{S},
indices::Union{Integer, Colon, StaticVector, Base.Slice, SOneTo}...,
) where {S}
Expand Down
2 changes: 1 addition & 1 deletion src/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ end
# wrap elements in Scalar to be consistent with 0D views
_maybewrapscalar(::Tuple{}, r::T) where {T} = Scalar{T}(r)
_maybewrapscalar(_, r) = r
function Base.view(S::SArray, I::Union{Colon, Integer, SOneTo, StaticArray{<:Tuple, Int}, CartesianIndex}...)
@propagate_inbounds function Base.view(S::SArray, I::Union{Colon, Integer, SOneTo, StaticArray{<:Tuple, Int}, CartesianIndex}...)
V = getindex(S, I...)
_maybewrapscalar(Base.index_dimsum(I...), V)
end
Expand Down
Loading