Skip to content

Commit 6e5e2a6

Browse files
committed
fix: Zero case in gather
1 parent c15dd3b commit 6e5e2a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gather.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ function gather(
4343
M = typelength(Tidx)
4444
dstsize = (size(src)[1:Nsrc-M]..., size(idx)...)
4545
dst = similar(src, Tsrc, dstsize)
46+
if isempty(src) || isempty(idx)
47+
return dst
48+
end
4649
return gather!(dst, src, idx)
4750
end
4851

0 commit comments

Comments
 (0)