Skip to content

Commit 08dda1a

Browse files
committed
coverage
1 parent 7d5034b commit 08dda1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch_scatter/utils/gen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def gen(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
2020
index_size[dim] = src.size(dim)
2121
if index.numel() > 0:
2222
index = index.view(index_size).expand_as(src)
23-
else: # PyTorch has a bug when view is used on zero-element tensors.
23+
else: # pragma: no cover
24+
# PyTorch has a bug when view is used on zero-element tensors.
2425
index = src.new_empty(index_size, dtype=torch.long)
2526

2627
# Broadcasting capabilties: Expand dimensions to match.

0 commit comments

Comments
 (0)