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

scipy-svn@scip... scipy-svn@scip...
Fri Dec 14 05:00:23 CST 2007


Author: rc
Date: 2007-12-14 05:00:19 -0600 (Fri, 14 Dec 2007)
New Revision: 3650

Modified:
   trunk/scipy/sparse/compressed.py
Log:
updated get_submatrix() docstring


Modified: trunk/scipy/sparse/compressed.py
===================================================================
--- trunk/scipy/sparse/compressed.py	2007-12-14 09:42:19 UTC (rev 3649)
+++ trunk/scipy/sparse/compressed.py	2007-12-14 11:00:19 UTC (rev 3650)
@@ -727,8 +727,10 @@
 
     def get_submatrix( self, slice0, slice1 ):
         """Return a submatrix of this matrix (new matrix is created).
-        Rows and columns can be selected using slice instances, tuples,
-        or scalars."""
+        Contigous range of rows and columns can be selected using:
+        1. a slice object
+        2. a tuple (from, to)
+        3. a scalar for single row/column selection."""
         aux = _cs_matrix._get_submatrix( self, self.shape[1], self.shape[0],
                                          slice1, slice0 )
         nr, nc = aux[3:]
@@ -918,9 +920,11 @@
         return data
     
     def get_submatrix( self, slice0, slice1 ):
-        """Return a submatrix of this matrix (new matrix is created)..
-        Rows and columns can be selected using slice instances, tuples,
-        or scalars."""
+        """Return a submatrix of this matrix (new matrix is created).
+        Contigous range of rows and columns can be selected using:
+        1. a slice object
+        2. a tuple (from, to)
+        3. a scalar for single row/column selection."""
         aux = _cs_matrix._get_submatrix( self, self.shape[0], self.shape[1],
                                          slice0, slice1 )
         nr, nc = aux[3:]



More information about the Scipy-svn mailing list