Skip to content

Commit 9a062ee

Browse files
committed
fix scalar view indexing for julia v1.1
1 parent 17b77d7 commit 9a062ee

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)