#11370: permutation.to_standard() breaks on empty permutations
-----------------------------+----------------------------------------------
   Reporter:  hivert         |          Owner:  sage-combinat       
       Type:  defect         |         Status:  new                 
   Priority:  major          |      Milestone:  sage-4.7.1          
  Component:  combinatorics  |       Keywords:  Standard permutation
Work_issues:                 |       Upstream:  N/A                 
   Reviewer:                 |         Author:  Florent Hivert      
     Merged:                 |   Dependencies:                      
-----------------------------+----------------------------------------------
 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
 {{{
 []
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11370>
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 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.

Reply via email to