#12778: Incorrect coercion of matrix elements when from different rings
----------------------------------+-----------------------------------------
       Reporter:  kcrisman        |         Owner:  jason, was
           Type:  defect          |        Status:  new       
       Priority:  major           |     Milestone:  sage-5.0  
      Component:  linear algebra  |    Resolution:            
       Keywords:                  |   Work issues:            
Report Upstream:  N/A             |     Reviewers:            
        Authors:                  |     Merged in:            
   Dependencies:                  |      Stopgaps:            
----------------------------------+-----------------------------------------

Comment (by kcrisman):

 I figured we used the `Sequence.universe` for this.  Here's the problem in
 `Sequence`.
 {{{
             for i in range(len(x)-1):
                 try:
                     x[i], x[i+1] = coerce.canonical_coercion(x[i],x[i+1])
 }}}
 This is fine for stepwise finding a universe, but what it does is try to
 coerce things one by one, instead of looking at all of them as a whole
 (which is probably slower, of course).

 I say that there must be an easy way to fix the matrix code so that we
 don't call `Sequence` immediately, but first use it to find a `universe`,
 then make the new `Sequence` as in your code.  That would fix this ticket.

 Then we could have a different ticket or sage-devel discussion on whether
 this `Sequence` behavior is, in fact, a bug.

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