We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77a732e commit 628ddb3Copy full SHA for 628ddb3
node2vec/node2vec.py
@@ -139,7 +139,7 @@ def _generate_walks(self) -> list:
139
:return: List of walks. Each walk is a list of nodes.
140
"""
141
142
- def flatten(l): return [item for sublist in l for item in sublist]
+ flatten = lambda l: [item for sublist in l for item in sublist]
143
144
# Split num_walks for each worker
145
num_walks_lists = np.array_split(range(self.num_walks), self.workers)
0 commit comments