Skip to content

Commit e52ee78

Browse files
authored
Merge pull request #195 from JuliaParallel/jb/11
fix scalar view indexing for julia v1.1
2 parents 17b77d7 + 9a062ee commit e52ee78

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/darray.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,9 @@ function Base.getindex(d::DArray, i::Int...)
646646
end
647647

648648
Base.getindex(d::DArray) = d[1]
649+
if VERSION > v"1.1-"
650+
Base.getindex(d::SubDArray, I::Int...) = invoke(getindex, Tuple{SubArray{<:Any,N},Vararg{Int,N}} where N, d, I...)
651+
end
649652
Base.getindex(d::SubOrDArray, I::Union{Int,UnitRange{Int},Colon,Vector{Int},StepRange{Int,Int}}...) = view(d, I...)
650653

651654
function Base.isassigned(D::DArray, i::Integer...)

0 commit comments

Comments
 (0)