Skip to content

Commit 48482bd

Browse files
committed
use block scope
1 parent e7aab94 commit 48482bd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/sage/graphs/generic_graph.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23064,12 +23064,14 @@ 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+
23068+
sage: # needs sage.groups
2306723069
sage: C5 = graphs.CycleGraph(5)
2306823070
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
23071+
sage: ar = C5.automorphism_group().random_element()
23072+
sage: R = C5.relabel(ar, inplace=False)
23073+
sage: perm = C5.is_isomorphic(R, certificate=True)[1]
23074+
sage: perm == {u: ar(u) for u in C5}
2307323075
True
2307423076

2307523077
A way to get a random relabeling::

0 commit comments

Comments
 (0)