#6553: [with patch, needs work] fast slicing of sparse matrices
----------------------------+-----------------------------------------------
 Reporter:  jason           |       Owner:  was        
     Type:  defect          |      Status:  new        
 Priority:  major           |   Milestone:  sage-4.1.1 
Component:  linear algebra  |    Keywords:             
 Reviewer:                  |      Author:  Jason Grout
   Merged:                  |  
----------------------------+-----------------------------------------------

Comment(by rbeezer):

 Nicely done.  Three comments before giving this a positive review.

 1.  The last test behaves differently for me, and the result seems "more
 correct" according to the density specified.  This is on 4.1.rc1 (which is
 the newest upgrade I could muster).

 {{{
     sage: len(B.nonzero_positions())
 Expected:
     14047
 Got:
     100550
 }}}

 2.  Lists of non-integers (admittedly silly) fails silently and
 incorrectly.  It would appear that no entry of the new matrix gets set
 properly, so the result is the zero matrix of the correct size.

 {{{
 sage: A = random_matrix(ZZ, 20, 20, x=10, sparse=True)
 sage: len(A.nonzero_positions())
 353
 sage: A.matrix_from_rows_and_columns([1.1, 2.1, 3.1, 4.1], [5.1, 6.1, 7.1,
 8.1])

 [0 0 0 0]
 [0 0 0 0]
 [0 0 0 0]
 [0 0 0 0]
 }}}

 3.  I'd think the doctests would be improved if there were tests for
 [[BR]]
 (a) the condition in (2)[[BR]]
 (b) the case of non-list input (raising the {{{TypeError}}} as
 implemented)

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