Skip to content

Commit 9eca537

Browse files
authored
Merge pull request #220 from mbauman/patch-1
Fix internal uses of reindex for Julia 1.5 support
2 parents 9821bcb + 1f68852 commit 9eca537

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+
if 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)