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

scipy-svn@scip... scipy-svn@scip...
Wed Jul 18 08:13:15 CDT 2007


Author: dmitrey.kroshko
Date: 2007-07-18 08:12:12 -0500 (Wed, 18 Jul 2007)
New Revision: 3173

Modified:
   trunk/Lib/optimize/cobyla.py
Log:
bugfix (overwriting initial x0 by cobyla)
(ticket 389)


Modified: trunk/Lib/optimize/cobyla.py
===================================================================
--- trunk/Lib/optimize/cobyla.py	2007-07-18 12:29:42 UTC (rev 3172)
+++ trunk/Lib/optimize/cobyla.py	2007-07-18 13:12:12 UTC (rev 3173)
@@ -10,7 +10,7 @@
 
 from __future__ import nested_scopes
 import _cobyla
-
+from numpy import copy
 def fmin_cobyla(func, x0, cons, args=(), consargs=None, rhobeg=1.0, rhoend=1e-4,
                 iprint=1, maxfun=1000):
     """
@@ -91,7 +91,7 @@
             k += 1
         return f
 
-    xopt = _cobyla.minimize(calcfc, m=m, x=x0, rhobeg=rhobeg, rhoend=rhoend,
+    xopt = _cobyla.minimize(calcfc, m=m, x=copy(x0), rhobeg=rhobeg, rhoend=rhoend,
                             iprint=iprint, maxfun=maxfun)
 
     return xopt



More information about the Scipy-svn mailing list