Solution?: The beginning of the code for line_graph:
if self._directed: G=DiGraph() G.add_vertices(self.edges(labels=labels)) for v in self: # Connect appropriate incident edges of the vertex v G.add_edges([(e,f) for e in self.incoming_edge_iterator (v, labels=labels) \ for f in self.outgoing_edge_iterator(v, labels=labels)]) return G I think that if self.allow_loops() == True, then G = DiGraph() should be G = DiGraph(loops=True) Dave -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org