Skip to content
Snippets Groups Projects
Commit 3225419b authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Manage empty graph

This can happen if the edgelist file is not found.
parent fbd06e0f
No related branches found
No related tags found
No related merge requests found
......@@ -143,15 +143,16 @@ if __name__ == "__main__":
n1 = len_H
n2 = len_H
# First and last dates:
node_index = min(G.nodes)
my_date = node_to_date_eddy(node_index, G.graph["e_overestim"],
only_date = True)
print("First date:", my_date)
node_index = max(G.nodes)
my_date = node_to_date_eddy(node_index, G.graph["e_overestim"],
only_date = True)
print("Last date:", my_date)
if len_H >= 1:
# First and last dates:
node_index = min(G.nodes)
my_date = node_to_date_eddy(node_index, G.graph["e_overestim"],
only_date = True)
print("First date:", my_date)
node_index = max(G.nodes)
my_date = node_to_date_eddy(node_index, G.graph["e_overestim"],
only_date = True)
print("Last date:", my_date)
if args.merging:
print("\nMerging:")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment