Skip to content

Commit 2fc50b0

Browse files
committed
Modifications to pass the tests (hopefully)
- Removed white spaces in blanklines (in the Examples) - Add import command for parent
1 parent 738731b commit 2fc50b0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sage/graphs/line_graph.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def line_graph(g, labels=True, return_labels=False):
350350
((2, 3, None), (3, 4, None), None)]
351351
352352
Examples with multiple edges::
353-
353+
354354
sage: L = Graph([(0,1),(0,1),(1,2)],multiedges=True).line_graph()
355355
sage: L.edges()
356356
[((0, 1, 0), (0, 1, 1), None), ((0, 1, 1), (1, 2, 2), None),
@@ -375,14 +375,14 @@ def line_graph(g, labels=True, return_labels=False):
375375
[((0, 1, 1), (1, 2, 2), None), ((0, 1, 0), (1, 2, 2), None)]
376376
377377
An example with a loop::
378-
378+
379379
sage: g = Graph([(0,0),(0,1),(0,2),(1,2)],multiedges=True,loops=True)
380380
sage: L = g.line_graph()
381381
sage: L.edges()
382382
[((0, 0, None), (0, 1, None), None), ((0, 0, None), (0, 2, None), None),
383383
((0, 1, None), (0, 2, None), None), ((0, 1, None), (1, 2, None), None),
384384
((0, 2, None), (1, 2, None), None)]
385-
385+
386386
TESTS:
387387
388388
:issue:`13787`::
@@ -407,6 +407,7 @@ def line_graph(g, labels=True, return_labels=False):
407407
labels = True
408408
origlabels_dic = {(u, v, id): (u, v, label)
409409
for id, (u, v, label) in enumerate(g.edge_iterator())}
410+
from sage.structure.element cimport parent
410411
g = parent(g)([g, origlabels_dic.keys()], format='vertices_and_edges', multiedges=True)
411412
412413
if g._directed:

0 commit comments

Comments
 (0)