Skip to content

Commit

Permalink
Update src/gather.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Carlo Lucibello <[email protected]>
  • Loading branch information
yuehhua and CarloLucibello authored Apr 15, 2021
1 parent b891685 commit 413bd02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gather.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function gather!(dst::AbstractArray, src::AbstractArray, idx::AbstractArray)
dims = _check_dims(src, dst, idx)
colons = ntuple(i -> Colon(), dims)
for k in CartesianIndices(idx)
_view(dst, colons, k) .= _view(src, colons, idx, k)
_view(dst, colons, k) .= _view(src, colons, idx[k])
end
return dst
end
Expand Down

0 comments on commit 413bd02

Please sign in to comment.