#5256: [with patch, needs review] coherent handling of trivial matrices (depend 
on
#5244, #5242).
----------------------------+-----------------------------------------------
 Reporter:  hivert          |       Owner:  was                          
     Type:  defect          |      Status:  new                          
 Priority:  critical        |   Milestone:  sage-3.3                     
Component:  linear algebra  |    Keywords:  matrices, invert, determinant
----------------------------+-----------------------------------------------
 There where a lot of inconsistency and bugs in the handling of trivial
 matrices.
 The following patch aims to solve these and to check systematicly the
 coherence. Here is a selection of weirdness:
  * plain wrong answers
 {{{
 sage: m = matrix(SR, 1,1, [1])
 sage: m.inverse()
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 sage: m = matrix(RDF, 0,2)
 sage: m.inverse()
 []
 }}}
  * Inconsistencies in the answers depending on the base ring
 {{{
 sage: m = matrix(RDF, 1,1)
 sage: m.inverse()
 ---------------------------------------------------------------------------
 LinAlgError                               Traceback (most recent call
 last)
 }}}
    whereas
 {{{
 sage: m = matrix(QQ, 1,1)
 sage: m.inverse()
 ---------------------------------------------------------------------------
 ZeroDivisionError                         Traceback (most recent call
 last)
 }}}

 Aside rewriting some error messages, changing some exception and working
 around several bug in particular in maxima's handling of matrix over SR,
 the main contribution of this patch lies in the function
 {{{test_trivial_matrices_inverse}}} in {{{sage/matrix/matrix_space.py}}}
 and its associated doctests. Trough a bunch of assertions this function
 indirectly checks the behavior of matrix spaces. Any new implementation of
 a kind of matrices should be checked be this function.

 Patch Author: Florent Hivert

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5256>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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