Opened 6 years ago

Last modified 6 years ago

#21824 closed defect

surprising behaviour of DegreeSequences(1) — at Initial Version

Reported by: mantepse Owned by:
Priority: major Milestone: sage-7.5
Component: graph theory Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: [d for d in DegreeSequences(1)]
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-1ed3bfa4681c> in <module>()
----> 1 [d for d in DegreeSequences(Integer(1))]

/home/martin/sage-develop/src/sage/combinat/degree_sequences.pyx in sage.combinat.degree_sequences.DegreeSequences.__iter__ (/home/martin/sage-develop/src/build/cythonized/sage/combinat/degree_sequences.c:3014)()
    377 
    378         init(self._n)
--> 379         return iter(sequences)
    380 
    381     def __dealloc__():

TypeError: 'NoneType' object is not iterable
sage: [d for d in DegreeSequences(2)]
[[0, 0], [1, 1]]
sage: [d for d in DegreeSequences(3)]
[[0, 0, 0], [1, 1, 0], [2, 1, 1], [2, 2, 2]]
sage: [d for d in DegreeSequences(1)]
[[0, 0, 0], [1, 1, 0], [2, 1, 1], [2, 2, 2]]

Change History (0)

Note: See TracTickets for help on using tickets.