#13564: Improve diagonal from matrix/matrix2.pyx
------------------------------------+---------------------------------------
       Reporter:  r.gaia.cs         |         Owner:  jason, was  
           Type:  enhancement       |        Status:  needs_review
       Priority:  major             |     Milestone:  sage-5.5    
      Component:  linear algebra    |    Resolution:              
       Keywords:  matrix, diagonal  |   Work issues:              
Report Upstream:  N/A               |     Reviewers:              
        Authors:  r.gaia.cs         |     Merged in:              
   Dependencies:                    |      Stopgaps:              
------------------------------------+---------------------------------------

Comment (by ppurka):

 Some comments:
 1. Should we be raising an error or simply returning an empty list if the
 `d` for the `d`-th diagonal is provided outside the range of the number of
 rows or columns? For instance, the empty matrix is returning an empty
 diagonal. Also,
 
[http://www.wolframalpha.com/input/?i=Diagonal%5B%7B%7B1%2C+2%2C+3%2C+4%7D%2C+%7B5%2C+6%2C+7%2C+8%7D%2C+%7B9%2C+10%2C+11%2C+12%7D%7D%2C+4%5D
 Mathematica] and Matlab silently return empty matrices. Octave raises an
 error. Numpy gives an empty matrix until `nrows()` or `ncols()` and then
 raises an error.
 2. If it seems more proper to raise an error, the error string could be
 written like the statements below. Note that `d` is always ''less than''
 and never equal to `nrows()` or `ncols()`.
 {{{
 The value `d` should be less than the number of columns in the matrix.
 The value `-d` should be less than the number of rows of the matrix.
 }}}

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