Skip to content

Commit

Permalink
graphs: use next(vertex_iterator()) to get the first (and only) vertex
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilbouvier committed Jul 2, 2024
1 parent ee4f951 commit 420692b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sage/graphs/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8209,7 +8209,7 @@ def modular_decomposition(self, algorithm=None, style='tuple'):
if not self.order():
D = None
elif self.order() == 1:
D = create_normal_node(self.vertices(sort=False)[0])
D = create_normal_node(next(self.vertex_iterator()))
else:
D = habib_maurer_algorithm(self)

Expand Down

0 comments on commit 420692b

Please sign in to comment.