[Scipy-svn] r3768 - trunk/scipy/sparse

scipy-svn@scip... scipy-svn@scip...
Wed Jan 2 18:15:12 CST 2008


Author: wnbell
Date: 2008-01-02 18:14:58 -0600 (Wed, 02 Jan 2008)
New Revision: 3768

Modified:
   trunk/scipy/sparse/csr.py
Log:
sort inplace when converting to lil


Modified: trunk/scipy/sparse/csr.py
===================================================================
--- trunk/scipy/sparse/csr.py	2008-01-03 00:02:34 UTC (rev 3767)
+++ trunk/scipy/sparse/csr.py	2008-01-03 00:14:58 UTC (rev 3768)
@@ -114,10 +114,10 @@
         from lil import lil_matrix
         lil = lil_matrix(self.shape,dtype=self.dtype)
      
-        csr = self.sorted_indices() #lil_matrix needs sorted rows
+        self.sort_indices() #lil_matrix needs sorted rows
         
         rows,data = lil.rows,lil.data
-        ptr,ind,dat = csr.indptr,csr.indices,csr.data
+        ptr,ind,dat = self.indptr,self.indices,self.data
 
         for n in xrange(self.shape[0]):
             start = ptr[n]



More information about the Scipy-svn mailing list