Skip to content

Commit b38175b

Browse files
authored
Fix internal uses of reindex for Julia 1.5 support
1 parent 47597cd commit b38175b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/darray.jl

+8-1
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,17 @@ function Base.copyto!(a::Array, s::SubDArray)
597597
return a
598598
end
599599

600+
VERSION < v"1.2"
601+
# This is an internal API that has changed
602+
reindex(A, I, J) = Base.reindex(A, I, J)
603+
else
604+
reindex(A, I, J) = Base.reindex(I, J)
605+
end
606+
600607
function DArray(SD::SubArray{T,N}) where {T,N}
601608
D = SD.parent
602609
DArray(size(SD), procs(D)) do I
603-
lindices = Base.reindex(SD, SD.indices, I)
610+
lindices = reindex(SD, SD.indices, I)
604611
convert(Array, D[lindices...])
605612
end
606613
end

0 commit comments

Comments
 (0)