What about sage: A = networkx.complete_bipartite_graph(2r, 3r)
On 14/12/2017 09:57, Antonio Rojas wrote:
Hi all, In Arch we have upgraded networkx to version 2. This comes with major API changes that affect Sage's interface, and I'm currently trying to fix these issues. I'm struggling with a particular issue with bipartite graphs. In pure ipython, this code gives: In [1]: import networkx In [2]: A=networkx.complete_bipartite_graph(2,3) In [3]: list(A.edges()) Out[3]: [(0, 2), (0, 3), (0, 4), (1, 2), (1, 3), (1, 4)] The exact same code in Sage gives: sage: import networkx sage: A=networkx.complete_bipartite_graph(2,3) sage: list(A.edges()) [(0, 0), (0, 1), (0, 2), (1, 1), (1, 2)] As you can see, Sage has shifted the second set of vertices to start at 0 instead of 2, so of course this is not a bipartite graph anymore. This seems strange since there is no Sage code involved in these commands at first sight. Can someone point me to the Sage code that modifies networkx's output so I can look into it? Thanks.
-- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.