[Scipy-svn] r3218 - trunk/Lib/optimize

scipy-svn@scip... scipy-svn@scip...
Wed Aug 1 10:51:01 CDT 2007


Author: dmitrey.kroshko
Date: 2007-08-01 10:50:42 -0500 (Wed, 01 Aug 2007)
New Revision: 3218

Modified:
   trunk/Lib/optimize/optimize.py
Log:
minor changes in optimize.py


Modified: trunk/Lib/optimize/optimize.py
===================================================================
--- trunk/Lib/optimize/optimize.py	2007-08-01 14:39:21 UTC (rev 3217)
+++ trunk/Lib/optimize/optimize.py	2007-08-01 15:50:42 UTC (rev 3218)
@@ -156,7 +156,7 @@
 
       """
     fcalls, func = wrap_function(func, args)
-    x0 = atleast_1d(asfarray(x0))
+    x0 = asfarray(x0).flatten()
     N = len(x0)
     rank = len(x0.shape)
     if not -1 < rank < 2:
@@ -829,7 +829,7 @@
       fixed_point -- scalar fixed-point finder
 
       """
-    x0 = atleast_1d(asarray(x0))
+    x0 = asarray(x0).flatten()
     if maxiter is None:
         maxiter = len(x0)*200
     func_calls, f = wrap_function(f, args)
@@ -997,7 +997,7 @@
       fixed_point -- scalar fixed-point finder
 
     """
-    x0 = atleast_1d(asarray(x0))
+    x0 = asarray(x0).flatten()
     fcalls, f = wrap_function(f, args)
     gcalls, fprime = wrap_function(fprime, args)
     hcalls = 0
@@ -1662,7 +1662,7 @@
     # we need to use a mutable object here that we can update in the
     # wrapper function
     fcalls, func = wrap_function(func, args)
-    x = atleast_1d(asarray(x0))
+    x = asarray(x0).flatten()
     if retall:
         allvecs = [x]
     N = len(x)



More information about the Scipy-svn mailing list