Skip to content

Commit d8a30bf

Browse files
maleadtjrevels
authored andcommitted
Forward all calls to getindex(::Partials) to the inner container.
Otherwise we always return an Array, where a Tuple would have sufficed (eg. when indexing with ranges).
1 parent 19003af commit d8a30bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/partials.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ end
2020
@inline Base.length(::Partials{N}) where {N} = N
2121
@inline Base.size(::Partials{N}) where {N} = (N,)
2222

23-
@inline Base.@propagate_inbounds Base.getindex(partials::Partials, i::Int) = partials.values[i]
23+
@inline Base.@propagate_inbounds Base.getindex(partials::Partials, I...) = partials.values[I...]
2424

2525
Base.iterate(partials::Partials) = iterate(partials.values)
2626
Base.iterate(partials::Partials, i) = iterate(partials.values, i)

0 commit comments

Comments
 (0)