[Scipy-svn] r6929 - in trunk: doc/release scipy/sparse

scipy-svn@scip... scipy-svn@scip...
Sat Nov 20 10:05:57 CST 2010


Author: warren.weckesser
Date: 2010-11-20 10:05:57 -0600 (Sat, 20 Nov 2010)
New Revision: 6929

Modified:
   trunk/doc/release/0.9.0-notes.rst
   trunk/scipy/sparse/base.py
Log:
DEP: sparse: removed a deprecated method from the spmatrix class.

Modified: trunk/doc/release/0.9.0-notes.rst
===================================================================
--- trunk/doc/release/0.9.0-notes.rst	2010-11-20 16:00:23 UTC (rev 6928)
+++ trunk/doc/release/0.9.0-notes.rst	2010-11-20 16:05:57 UTC (rev 6929)
@@ -123,3 +123,6 @@
 
 The deprecated modules ``helpdmod``, ``pexec`` and ``ppimport`` were removed
 from ``scipy.misc``.
+
+The ``save`` method of the ``spmatrix`` class in ``scipy.sparse``, which has
+been deprecated since version 0.7, was removed.

Modified: trunk/scipy/sparse/base.py
===================================================================
--- trunk/scipy/sparse/base.py	2010-11-20 16:00:23 UTC (rev 6928)
+++ trunk/scipy/sparse/base.py	2010-11-20 16:05:57 UTC (rev 6929)
@@ -587,26 +587,7 @@
             for i,v in enumerate(values[:max_index]):
                 self[i, i + k] = v
 
-    def save(self, file_name, format = '%d %d %f\n'):
-        #deprecated on Dec 14 2007
-        #remove after 0.7 release
-        warn('save() is deprecated, consider using mmwrite() or savemat()' \
-                ' provided by scipy.io instead',
-                DeprecationWarning)
-        try:
-            fd = open(file_name, 'w')
-        except Exception, e:
-            raise e, file_name
 
-        fd.write('%d %d\n' % self.shape)
-        fd.write('%d\n' % self.size)
-        for ii in xrange(self.size):
-            ir, ic = self.rowcol(ii)
-            data = self.getdata(ii)
-            fd.write(format % (ir, ic, data))
-        fd.close()
-
-
 from sputils import _isinstance
 
 def isspmatrix(x):



More information about the Scipy-svn mailing list