[Scipy-svn] r5044 - trunk/scipy/lib/lapack/tests

scipy-svn@scip... scipy-svn@scip...
Mon Nov 10 09:35:00 CST 2008


Author: cdavid
Date: 2008-11-10 09:34:50 -0600 (Mon, 10 Nov 2008)
New Revision: 5044

Modified:
   trunk/scipy/lib/lapack/tests/common.py
Log:
Simplify funcs getter logic to make sure clapack and flapack have the same sets.

Modified: trunk/scipy/lib/lapack/tests/common.py
===================================================================
--- trunk/scipy/lib/lapack/tests/common.py	2008-11-10 15:34:27 UTC (rev 5043)
+++ trunk/scipy/lib/lapack/tests/common.py	2008-11-10 15:34:50 UTC (rev 5044)
@@ -29,35 +29,20 @@
 else:
     CLAPACK_IS_EMPTY = False
 
+funcs = ['ssygv', 'dsygv', 'ssygvd', 'dsygvd', 'ssyev', 'dsyev', 'ssyevr',
+         'dsyevr', 'sgehrd', 'dgehrd', 'sgebal', 'dgebal']
+
 if not FLAPACK_IS_EMPTY:
-    FUNCS_FLAPACK = {'ssygv' : flapack.ssygv,
-                     'dsygv': flapack.dsygv,
-                     'ssygvd' : flapack.ssygvd,
-                     'dsygvd' : flapack.dsygvd,
-                     'ssyev' : flapack.ssyev,
-                     'dsyev': flapack.dsyev,
-                     'ssyevr' : flapack.ssyevr,
-                     'dsyevr' : flapack.dsyevr,
-                     'sgehrd' : flapack.sgehrd,
-                     'dgehrd' : flapack.dgehrd,
-                     'sgebal' : flapack.sgebal,
-                     'dgebal': flapack.dgebal}
+    FUNCS_FLAPACK = {}
+    for f in funcs:
+        FUNCS_FLAPACK[f] = getattr(flapack, f)
 else:
     FUNCS_FLAPACK = None
 
 if not CLAPACK_IS_EMPTY:
-    FUNCS_CLAPACK = {'ssygv' : clapack.ssygv,
-                     'dsygv': clapack.dsygv,
-                     'ssygvd' : clapack.ssygvd,
-                     'dsygvd' : clapack.dsygvd,
-                     'ssyev' : clapack.ssyev,
-                     'dsyev': clapack.dsyev,
-                     'ssyevr' : clapack.ssyevr,
-                     'dsyevr' : clapack.dsyevr,
-                     'sgehrd' : flapack.sgehrd,
-                     'dgehrd' : flapack.dgehrd,
-                     'sgebal' : clapack.sgebal,
-                     'dgebal': clapack.dgebal}
+    FUNCS_CLAPACK = {}
+    for f in funcs:
+        FUNCS_CLAPACK[f] = getattr(clapack, f)
 else:
     FUNCS_CLAPACK = None
 



More information about the Scipy-svn mailing list