diff --git a/src/gather.jl b/src/gather.jl index c91d6c81d..1fb94fda3 100644 --- a/src/gather.jl +++ b/src/gather.jl @@ -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