Antonio Rojas
unread,Dec 14, 2017, 4:57:25 AM12/14/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-...@googlegroups.com
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.