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

scipy-svn@scip... scipy-svn@scip...
Sat Mar 31 22:44:57 CDT 2007


Author: oliphant
Date: 2007-03-31 22:44:55 -0500 (Sat, 31 Mar 2007)
New Revision: 2895

Modified:
   trunk/Lib/optimize/optimize.py
Log:
Fix input with extra 1's in the shape.

Modified: trunk/Lib/optimize/optimize.py
===================================================================
--- trunk/Lib/optimize/optimize.py	2007-03-31 07:57:28 UTC (rev 2894)
+++ trunk/Lib/optimize/optimize.py	2007-04-01 03:44:55 UTC (rev 2895)
@@ -654,7 +654,9 @@
       fixed_point -- scalar fixed-point finder
 
       """
-    x0 = asarray(x0)
+    x0 = asarray(x0).squeeze()
+    if x0.ndim == 0:
+        x0.shape = (1,)
     if maxiter is None:
         maxiter = len(x0)*200
     func_calls, f = wrap_function(f, args)



More information about the Scipy-svn mailing list