MCPcopy
hub / github.com/shenweichen/GraphEmbedding / partition_num

Function partition_num

ge/utils.py:44–48  ·  view source on GitHub ↗
(num, workers)

Source from the content-addressed store, hash-verified

42
43
44def partition_num(num, workers):
45 if num % workers == 0:
46 return [num // workers] * workers
47 else:
48 return [num // workers] * workers + [num % workers]

Callers 2

simulate_walksMethod · 0.85
simulate_walksMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected