#5452: Graph broken on a input of type dict of dicts
--------------------------+-------------------------------------------------
Reporter: slabbe | Owner: slabbe
Type: defect | Status: new
Priority: major | Milestone: sage-3.4
Component: graph theory | Keywords:
--------------------------+-------------------------------------------------
In sage-3.2.3 the code below was fine, but it is broken in sage-3.3 and
sage-3.4.rc0 :
{{{
sage: a,b,c,d,e,f=sorted(SymmetricGroup(3))
sage: Graph({b:{d:'c',e:'p'}, c:{d:'p',e:'c'}})
...
/sage/graphs/graph.pyc in __init__(self, data, pos, loops, format,
boundary, weighted, implementation, sparse, vertex_labels, **kwds)
8261 if v not in verts: verts.append(v)
8262 if hash(u) > hash(v):
-> 8263 if u in data[v]:
8264 if data[u][v] != data[v][u]:
8265 raise ValueError("Dict does not
agree on edge (%s,%s)"%(u,v))
KeyError: (1,2,3)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5452>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---