#11693: Loops are treated as multiedges when creating graph from list
----------------------------+-----------------------------------------------
Reporter: iandrus | Owner: iandrus
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.2
Component: graph theory | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
----------------------------+-----------------------------------------------
{{{
sage: Graph([[3,3]],multiedges=False)
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/Users/gvol/<ipython console> in <module>()
/Users/gvol/vcs/cur-sage/local/lib/python2.6/site-
packages/sage/graphs/graph.py in __init__(self, data, pos, loops, format,
boundary, weighted, implementation, sparse, vertex_labels, **kwds)
1137 if multiedges is False:
1138 # from sage.misc.prandom import choice
-> 1139 raise ValueError("Non-multigraph input
dict has multiple edges (%s,%s)"%(u, choice([v for v in data[u] if
data[u].count(v) > 1])))
1140 if multiedges is None: multiedges = True
1141 if multiedges is None: multiedges = False
ValueError: Non-multigraph input dict has multiple edges (3,3)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11693>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.