Ask Your Question

Revision history [back]

@nburing is right, replacing the None label with '' (the empty string does the job. If you have a partially labelled graph G, and want to replace the None labels with '', you can do the following:

sage: for u,v,l in G.edges():
....:     if l is None:
....:         G.set_edge_label(u,v,'')

@nburing @rburing is right, replacing the None label with '' (the empty string does the job. If you have a partially labelled graph G, and want to replace the None labels with '', you can do the following:

sage: for u,v,l in G.edges():
....:     if l is None:
....:         G.set_edge_label(u,v,'')

@rburing is right, replacing the None label with '' (the empty string string) does the job. If you have a partially labelled graph G, and want to replace the None labels with '', you can do the following:

sage: for u,v,l in G.edges():
....:     if l is None:
....:         G.set_edge_label(u,v,'')