Opened 14 months ago
Closed 14 months ago
#15665 closed defect (fixed)
Error with edges in empty immutable graph
Reported by: | tscrim | Owned by: | tscrim |
---|---|---|---|
Priority: | major | Milestone: | sage-6.1 |
Component: | graph theory | Keywords: | |
Cc: | ncohen | Merged in: | |
Authors: | Nathann Cohen | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | u/ncohen/15665 (Commits) | Commit: | 36c85722d6de7c5018efa598f1683cc5b50b87fd |
Dependencies: | Stopgaps: |
Description
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
Change History (5)
comment:1 Changed 14 months ago by ncohen
comment:2 Changed 14 months ago by ncohen
- Branch set to u/ncohen/15665
- Status changed from new to needs_review
Weird, I was sure I had fixed this already,somewhere...
Anyway. I also fixed a stupid waste of time, somewhere ;-)
Nathann
comment:3 Changed 14 months ago by git
- Commit set to 36c85722d6de7c5018efa598f1683cc5b50b87fd
Branch pushed to git repo; I updated commit sha1. New commits:
36c8572 | trac #15665: Error with edges in empty immutable graph |
comment:4 Changed 14 months ago by tscrim
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
Thanks Nathann.
comment:5 Changed 14 months ago by vbraun
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Why wouldn't this be an error with bitsets ? :-P
Nathann