Skip to content

Commit 1ce74b8

Browse files
oops add the dispatch
1 parent ba36f16 commit 1ce74b8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/array_partition.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,7 @@ end
225225
Returns the entry at index `j...` of every partition of `A`.
226226
"""
227227
Base.@propagate_inbounds function Base.getindex(A::ArrayPartition, i::Colon, j...)
228-
@boundscheck 0 < i <= length(A.x) || throw(BoundsError(A.x, i))
229-
@inbounds b = A.x[i]
230-
@boundscheck checkbounds(b, j...)
231-
@inbounds return b[j...]
228+
return getindex.(A.x, (j...,))
232229
end
233230

234231
"""

0 commit comments

Comments
 (0)