#13191: Construct a 2-d fan from rays only
--------------------------------+-------------------------------------------
       Reporter:  vbraun        |         Owner:  AlexGhitza        
           Type:  enhancement   |        Status:  needs_review      
       Priority:  major         |     Milestone:  sage-5.2          
      Component:  geometry      |    Resolution:                    
       Keywords:  toric         |   Work issues:                    
Report Upstream:  N/A           |     Reviewers:  Andrey Novoseltsev
        Authors:  Volker Braun  |     Merged in:                    
   Dependencies:  #12544        |      Stopgaps:                    
--------------------------------+-------------------------------------------

Comment (by novoselt):

 I was complaining not about removing duplicates - that is fine - but about
 the way how it is done. Nonetheless, it is still clear what is going on.
 But the line
 {{{
 sorted_rays = [ r for i,r in enumerate(sorted_rays) if r[1] !=
 sorted_rays[i-1][1] ]
 }}}
 is very confusing: sorted rays are already unique and the equality can be
 triggered only when the first element is equal to the previous, i.e. the
 last one, which is the same as first when the length is one. In other
 words the effect of this line is the same as
 {{{
 if len(sorted_rays) == 1: sorted_rays = []
 }}}
 and it does require some thinking to figure out that this is what
 happening and then realize how the rest of the code depends on it.

 So I still propose to unwind the code a bit, if you agree with the changes
 in the reviewer patch, please set it to positive review!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13191#comment:9>
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