Ticket #11370 (closed defect: fixed)
permutation.to_standard() breaks on empty permutations
| Reported by: | hivert | Owned by: | sage-combinat |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.7.1 |
| Component: | combinatorics | Keywords: | Standard permutation |
| Cc: | combinat | Work issues: | |
| Report Upstream: | N/A | Reviewers: | Mike Hansen |
| Authors: | Florent Hivert | Merged in: | sage-4.7.1.alpha3 |
| Dependencies: | Stopgaps: |
Description (last modified by hivert) (diff)
Yet another empty object problem
sage: sage.combinat.permutation.to_standard([]) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /home/data/Sage-Install/sage-4.6.2/devel/sage-combinat/sage/combinat/<ipython console> in <module>() /home/florent/src/Sage/sage/local/lib/python2.6/site-packages/sage/combinat/permutation.pyc in to_standard(p) 4243 4244 s = p[:] -> 4245 biggest = max(p) + 1 4246 i = 1 4247 for _ in range(len(p)): ValueError: max() arg is an empty sequence
should be
[]
I also fixed the return type of {{{from_reduced_word([])}}.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

