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

scipy-svn@scip... scipy-svn@scip...
Mon Mar 29 23:39:16 CDT 2010


Author: cdavid
Date: 2010-03-29 23:39:16 -0500 (Mon, 29 Mar 2010)
New Revision: 6282

Modified:
   trunk/scipy/linalg/lapack.py
Log:
PY3K: replace obsolete new usage with types.

Modified: trunk/scipy/linalg/lapack.py
===================================================================
--- trunk/scipy/linalg/lapack.py	2010-03-30 04:39:08 UTC (rev 6281)
+++ trunk/scipy/linalg/lapack.py	2010-03-30 04:39:16 UTC (rev 6282)
@@ -6,11 +6,10 @@
 
 __all__ = ['get_lapack_funcs']
 
-import new
-
 # The following ensures that possibly missing flavor (C or Fortran) is
 # replaced with the available one. If none is available, exception
 # is raised at the first attempt to use the resources.
+import types
 
 import numpy
 
@@ -97,9 +96,9 @@
                 func2 = getattr(m2,func_name,None)
                 if func2 is not None:
                     exec _colmajor_func_template % {'func_name':func_name}
-                    func = new.function(func_code,
-                                        {'clapack_func':func2},
-                                        func_name)
+                    func = types.FunctionType(func_code,
+                                              {'clapack_func':func2},
+                                              func_name)
                     func.module_name = m2_name
                     func.__doc__ = func2.__doc__
         func.prefix = required_prefix



More information about the Scipy-svn mailing list