Skip to content

Commit e7aab94

Browse files
committed
fix doctests
1 parent 0eb0812 commit e7aab94

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/sage/graphs/generic_graph.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23064,14 +23064,13 @@ def relabel(self, perm=None, inplace=True, return_map=False, check_input=True, c
2306423064
[0 0 1]
2306523065
[0 0 1]
2306623066
[1 1 0]
23067-
sage: G = graphs.CycleGraph(5)
23068-
sage: G.relabel({u: str(u) for u in G}, inplace=True)
23069-
sage: ar = G.automorphism_group().random_element() # needs sage.groups
23070-
sage: H = G.relabel(ar, inplace=False) # needs sage.groups
23071-
sage: G.is_isomorphic(H, certificate=True)[1] # needs sage.groups
23072-
{'0': '3', '1': '2', '2': '1', '3': '0', '4': '4'}
23073-
sage: {u: ar(u) for u in G} # needs sage.groups
23074-
{'0': '3', '1': '2', '2': '1', '3': '0', '4': '4'}
23067+
sage: C5 = graphs.CycleGraph(5)
23068+
sage: C5.relabel({u: str(u) for u in C5}, inplace=True)
23069+
sage: ar = C5.automorphism_group().random_element() # needs sage.groups
23070+
sage: R = C5.relabel(ar, inplace=False) # needs sage.groups
23071+
sage: perm = C5.is_isomorphic(R, certificate=True)[1] # needs sage.groups
23072+
sage: perm == {u: ar(u) for u in C5} # needs sage.groups
23073+
True
2307523074

2307623075
A way to get a random relabeling::
2307723076

0 commit comments

Comments
 (0)