[Scipy-svn] r7001 - trunk/scipy/linalg

scipy-svn@scip... scipy-svn@scip...
Sat Dec 11 12:27:02 CST 2010


Author: ptvirtan
Date: 2010-12-11 12:27:02 -0600 (Sat, 11 Dec 2010)
New Revision: 7001

Modified:
   trunk/scipy/linalg/decomp_qr.py
Log:
ENH: linalg/decomp_qr: Avoid calling find_best_lapack_type twice.

Modified: trunk/scipy/linalg/decomp_qr.py
===================================================================
--- trunk/scipy/linalg/decomp_qr.py	2010-12-11 02:22:29 UTC (rev 7000)
+++ trunk/scipy/linalg/decomp_qr.py	2010-12-11 18:27:02 UTC (rev 7001)
@@ -100,8 +100,7 @@
     if mode == 'r':
         return R
 
-    if find_best_lapack_type((a1,))[0] == 's' or \
-                find_best_lapack_type((a1,))[0] == 'd':
+    if find_best_lapack_type((a1,))[0] in ('s', 'd'):
         gor_un_gqr, = get_lapack_funcs(('orgqr',), (qr,))
     else:
         gor_un_gqr, = get_lapack_funcs(('ungqr',), (qr,))



More information about the Scipy-svn mailing list