Skip to content

Commit 2f273b5

Browse files
committed
DArray: Add Array conversion method
1 parent de64cb1 commit 2f273b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/array/darray.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ function Base.collect(d::DArray{T,N}; tree=false, copyto=false) where {T,N}
197197
treereduce_nd(dimcatfuncs, asyncmap(fetch, a.chunks))
198198
end
199199
end
200+
Array{T,N}(A::DArray{S,N}) where {T,N,S} = convert(Array{T,N}, collect(A))
200201

201202
Base.wait(A::DArray) = foreach(wait, A.chunks)
202203

0 commit comments

Comments
 (0)