Skip to content

Commit

Permalink
Update src/scatter.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 2e5765f commit b891685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scatter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function scatter!(op, dst::AbstractArray, src::AbstractArray, idx::AbstractArray
dims = _check_dims(dst, src, idx)
colons = Base.ntuple(_->Colon(), dims)
for k in CartesianIndices(idx)
dst_v = _view(dst, colons, idx, k)
dst_v = _view(dst, colons, idx[k])
src_v = _view(src, colons, k)
dst_v .= (op).(dst_v, src_v)
end
Expand Down

0 comments on commit b891685

Please sign in to comment.