Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't iterate on nodes if run with no_infomap=True #345

Open
danieledler opened this issue Sep 14, 2023 · 0 comments
Open

Can't iterate on nodes if run with no_infomap=True #345

danieledler opened this issue Sep 14, 2023 · 0 comments

Comments

@danieledler
Copy link
Contributor

To replicate:

edges = [
    [1,2],
    [1,3],
    [2,3],
    [3,4],
    [4,5],
]
G = nx.Graph()
G.add_edges_from(edges)

im = infomap.Infomap(silent=True, no_infomap=True)
im.add_networkx_graph(G)
im.run()
for node in im.nodes:
    print(node.node_id, node.data.flow)

Output is

0 0.0

With no_infomap=False, the output is

3 0.30000000000000004
1 0.2
2 0.2
4 0.2
5 0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant