Skip to content

Commit e8214d4

Browse files
committed
better coalesce default argument
1 parent d4306c8 commit e8214d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch_cluster/rw.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@torch.jit.script
88
def random_walk(row: torch.Tensor, col: torch.Tensor, start: torch.Tensor,
99
walk_length: int, p: float = 1, q: float = 1,
10-
coalesced: bool = False, num_nodes: Optional[int] = None):
10+
coalesced: bool = True, num_nodes: Optional[int] = None):
1111
"""Samples random walks of length :obj:`walk_length` from all node indices
1212
in :obj:`start` in the graph given by :obj:`(row, col)` as described in the
1313
`"node2vec: Scalable Feature Learning for Networks"
@@ -26,7 +26,7 @@ def random_walk(row: torch.Tensor, col: torch.Tensor, start: torch.Tensor,
2626
breadth-first strategy and depth-first strategy (default: :obj:`1`)
2727
coalesced (bool, optional): If set to :obj:`True`, will coalesce/sort
2828
the graph given by :obj:`(row, col)` according to :obj:`row`.
29-
(default: :obj:`False`)
29+
(default: :obj:`True`)
3030
num_nodes (int, optional): The number of nodes. (default: :obj:`None`)
3131
3232
:rtype: :class:`LongTensor`

0 commit comments

Comments
 (0)