#15665: Error with edges in empty immutable graph
----------------------------+----------------------------
   Reporter:  tscrim        |            Owner:  tscrim
       Type:  defect        |           Status:  new
   Priority:  major         |        Milestone:  sage-6.1
  Component:  graph theory  |         Keywords:
  Merged in:                |          Authors:
  Reviewers:                |  Report Upstream:  N/A
Work issues:                |           Branch:
     Commit:                |     Dependencies:
   Stopgaps:                |
----------------------------+----------------------------
 Using the default backend, it works:
 {{{
 sage: Graph().edges()
 []
 }}}
 but making the graph immutable does not:
 {{{
 sage: Graph(immutable=True).edges()
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)
 <ipython-input-10-140959f52625> in <module>()
 ----> 1 Graph(immutable=True).edges()

 /home/travis/sage/local/lib/python2.7/site-
 packages/sage/graphs/generic_graph.pyc in edges(self, labels, sort, key)
    9397         if not(sort) and key:
    9398             raise ValueError('sort keyword is False, yet a key
 function is given')
 -> 9399         L = list(self.edge_iterator(labels=labels))
    9400         if sort:
    9401             L.sort(key=key)

 /home/travis/sage/local/lib/python2.7/site-
 packages/sage/graphs/base/static_sparse_backend.so in iterator_edges
 (sage/graphs/base/static_sparse_backend.c:7820)()

 /home/travis/sage/local/lib/python2.7/site-packages/sage/misc/bitset.so in
 sage.misc.bitset.FrozenBitset.__init__ (sage/misc/bitset.c:5548)()

 ValueError: Bitsets must not be empty
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/15665>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to