La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous invitons à y créer vos nouveaux projets.
Open in Web IDE
Quickly and easily edit multiple files in your project.
Edit
Edit this file only.
1 2 3 4 5 6 7 from ..graph cimport Graph import networkx as nx def parsenx2graph(list_gs): new_gs=[nx.relabel_nodes(g,{node:str(node) for node in list(g.nodes)},copy=True) for g in list_gs] new_gs=[Graph(g) for g in new_gs] return new_gs
from ..graph cimport Graph import networkx as nx def parsenx2graph(list_gs): new_gs=[nx.relabel_nodes(g,{node:str(node) for node in list(g.nodes)},copy=True) for g in list_gs] new_gs=[Graph(g) for g in new_gs] return new_gs