[Scipy-svn] r4619 - in trunk/scipy: sparse/linalg/dsolve sparse/linalg/dsolve/umfpack sparse/linalg/dsolve/umfpack/tests sparse/linalg/eigen/arpack/tests stats

scipy-svn@scip... scipy-svn@scip...
Fri Aug 8 02:11:33 CDT 2008


Author: jarrod.millman
Date: 2008-08-08 02:11:28 -0500 (Fri, 08 Aug 2008)
New Revision: 4619

Modified:
   trunk/scipy/sparse/linalg/dsolve/linsolve.py
   trunk/scipy/sparse/linalg/dsolve/umfpack/info.py
   trunk/scipy/sparse/linalg/dsolve/umfpack/tests/try_umfpack.py
   trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py
   trunk/scipy/stats/morestats.py
Log:
cleanup


Modified: trunk/scipy/sparse/linalg/dsolve/linsolve.py
===================================================================
--- trunk/scipy/sparse/linalg/dsolve/linsolve.py	2008-08-08 06:17:26 UTC (rev 4618)
+++ trunk/scipy/sparse/linalg/dsolve/linsolve.py	2008-08-08 07:11:28 UTC (rev 4619)
@@ -107,9 +107,9 @@
     A linear solver, for a sparse, square matrix A, using LU decomposition where
     L is a lower triangular matrix and U is an upper triagular matrix.
 
-    Returns a factored_lu object. (scipy.linsolve._superlu.SciPyLUType)
+    Returns a factored_lu object. (scipy.sparse.linalg.dsolve._superlu.SciPyLUType)
 
-    See scipy.linsolve._superlu.dgstrf for more info.
+    See scipy.sparse.linalg.dsolve._superlu.dgstrf for more info.
     """
 
     if not isspmatrix_csc(A):

Modified: trunk/scipy/sparse/linalg/dsolve/umfpack/info.py
===================================================================
--- trunk/scipy/sparse/linalg/dsolve/umfpack/info.py	2008-08-08 06:17:26 UTC (rev 4618)
+++ trunk/scipy/sparse/linalg/dsolve/umfpack/info.py	2008-08-08 07:11:28 UTC (rev 4619)
@@ -50,7 +50,7 @@
 :Examples:
 ----------
 
-Assuming this module imported as um (import scipy.linsolve.umfpack as um)
+Assuming this module imported as um (import scipy.sparse.linalg.dsolve.umfpack as um)
 
 Sparse matrix in CSR or CSC format: mtx
 Righthand-side: rhs

Modified: trunk/scipy/sparse/linalg/dsolve/umfpack/tests/try_umfpack.py
===================================================================
--- trunk/scipy/sparse/linalg/dsolve/umfpack/tests/try_umfpack.py	2008-08-08 06:17:26 UTC (rev 4618)
+++ trunk/scipy/sparse/linalg/dsolve/umfpack/tests/try_umfpack.py	2008-08-08 07:11:28 UTC (rev 4619)
@@ -4,16 +4,16 @@
 """Benchamrks for umfpack module"""
 
 from optparse import OptionParser
-import scipy.linsolve.umfpack as um
-import numpy as nm
-#import scipy.io as io
-import scipy.sparse as sp
-import scipy.linalg as nla
-#import pylab
 import time
 import urllib
 import gzip
 
+import numpy as np
+
+import scipy.sparse as sp
+import scipy.sparse.linalg.dsolve.umfpack as um
+import scipy.linalg as nla
+
 defaultURL = 'http://www.cise.ufl.edu/research/sparse/HBformat/'
 
 usage = """%%prog [options] <matrix file name> [<matrix file name>, ...]
@@ -35,8 +35,8 @@
     nRow, nCol = map( int, fd.readline().split() )
     nItem = int( fd.readline() )
 
-    ij = nm.zeros( (nItem,2), nm.int32 )
-    val = nm.zeros( (nItem,), nm.float64 )
+    ij = np.zeros( (nItem,2), np.int32 )
+    val = np.zeros( (nItem,), np.float64 )
     for ii, row in enumerate( fd.readlines() ):
         aux = row.split()
         ij[ii] = int( aux[0] ), int( aux[1] )
@@ -54,7 +54,7 @@
 
     ij, val = io.read_array( fd,
                              columns = [(0,1), (2,)],
-                             atype = (nm.int32, nm.float64),
+                             atype = (np.int32, np.float64),
                              rowsize = nItem )
 
     mtx = sp.csc_matrix( (val, ij), dims = (nRow, nCol), nzmax = nItem )
@@ -137,14 +137,14 @@
 
         sizes.append( mtx.shape )
         nnzs.append( mtx.nnz )
-        tts = nm.zeros( (2,), dtype = nm.double )
+        tts = np.zeros( (2,), dtype = np.double )
         times.append( tts )
-        err = nm.zeros( (2,2), dtype = nm.double )
+        err = np.zeros( (2,2), dtype = np.double )
         errors.append( err )
 
         print 'size              : %s (%d nnz)' % (mtx.shape, mtx.nnz)
 
-        sol0 = nm.ones( (mtx.shape[0],), dtype = nm.double )
+        sol0 = np.ones( (mtx.shape[0],), dtype = np.double )
         rhs = mtx * sol0
 
         umfpack = um.UmfpackContext()
@@ -181,7 +181,7 @@
             import pylab
         except ImportError:
             raise ImportError, "could not import pylab"
-        times = nm.array( times )
+        times = np.array( times )
         print times
         pylab.plot( times[:,0], 'b-o' )
         if options.compare:
@@ -196,17 +196,17 @@
         xrng = range( len( nnzs ) )
         for ii in xrng:
             yy = y2 + 0.4 * (ax[3] - ax[2])\
-                 * nm.sin( ii * 2 * nm.pi / (len( xrng ) - 1) )
+                 * np.sin( ii * 2 * np.pi / (len( xrng ) - 1) )
 
             if options.compare:
                 pylab.text( ii+0.02, yy,
                             '%s\n%.2e err_umf\n%.2e err_sp'
-                            % (sizes[ii], nm.sum( errors[ii][0,:] ),
-                               nm.sum( errors[ii][1,:] )) )
+                            % (sizes[ii], np.sum( errors[ii][0,:] ),
+                               np.sum( errors[ii][1,:] )) )
             else:
                 pylab.text( ii+0.02, yy,
                             '%s\n%.2e err_umf'
-                            % (sizes[ii], nm.sum( errors[ii][0,:] )) )
+                            % (sizes[ii], np.sum( errors[ii][0,:] )) )
             pylab.plot( [ii, ii], [ax[2], ax[3]], 'k:' )
 
         pylab.xticks( xrng, ['%d' % (nnzs[ii] ) for ii in xrng] )

Modified: trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py	2008-08-08 06:17:26 UTC (rev 4618)
+++ trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py	2008-08-08 07:11:28 UTC (rev 4619)
@@ -39,10 +39,10 @@
 # class TestGeneigs(TestCase):
 #     def test(self):
 #         import pickle
-#         import scipy.linsolve
+#         from scipy.sparse.linalg import dsolve
 #         A,B = pickle.load(file('mats.pickle'))
 #         sigma = 27.
-#         sigma_solve = scipy.linsolve.splu(A - sigma*B).solve
+#         sigma_solve = dsolve.splu(A - sigma*B).solve
 #         w = ARPACK_gen_eigs(B.matvec, sigma_solve, B.shape[0], sigma, 10)[0]
 #         assert_array_almost_equal(w,
 #         [27.346442255386375,  49.100299170945405,  56.508474856551544, 56.835800191692492,

Modified: trunk/scipy/stats/morestats.py
===================================================================
--- trunk/scipy/stats/morestats.py	2008-08-08 06:17:26 UTC (rev 4618)
+++ trunk/scipy/stats/morestats.py	2008-08-08 07:11:28 UTC (rev 4619)
@@ -16,7 +16,6 @@
 import scipy.optimize as optimize
 import scipy.special as special
 import futil
-import numpy as sb
 from numpy.testing.decorators import setastest
 import warnings
 



More information about the Scipy-svn mailing list