#4650: matrix_modn_sparse needs cleanup
----------------------------+-----------------------------------------------
 Reporter:  boothby         |       Owner:  boothby   
     Type:  defect          |      Status:  new       
 Priority:  minor           |   Milestone:  sage-3.2.2
Component:  linear algebra  |    Keywords:  sparse    
----------------------------+-----------------------------------------------
 matrix_modn_sparse needs some housecleaning.  One gem, in particular:

 {{{
     cdef Py_ssize_t i, j, k
     k = 0
     for i from 0 <= i < self._nrows:
         for j from 0 <= j < self.rows[i].num_nonzero:
             k+=1
     return QQ(k)/QQ(self.nrows()*self.ncols())
 }}}

 also, it could use some fast nonzero_positions, getitem, etc. methods

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4650>
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