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

scipy-svn@scip... scipy-svn@scip...
Thu Jul 26 12:53:03 CDT 2007


Author: dmitrey.kroshko
Date: 2007-07-26 12:52:23 -0500 (Thu, 26 Jul 2007)
New Revision: 3198

Modified:
   trunk/Lib/optimize/tnc.py
Log:
output x now is numpy.array, not Python list


Modified: trunk/Lib/optimize/tnc.py
===================================================================
--- trunk/Lib/optimize/tnc.py	2007-07-26 14:24:51 UTC (rev 3197)
+++ trunk/Lib/optimize/tnc.py	2007-07-26 17:52:23 UTC (rev 3198)
@@ -32,7 +32,7 @@
 (as a list of values); or None, to abort the minimization.
 """
 from scipy.optimize import moduleTNC
-from numpy import asarray, inf
+from numpy import asarray, inf, array
 
 MSG_NONE = 0 # No messages
 MSG_ITER = 1 # One line per iteration
@@ -227,7 +227,7 @@
     rc, nf, x = moduleTNC.minimize(func_and_grad, x0, low, up, scale, offset,
             messages, maxCGit, maxfun, eta, stepmx, accuracy,
             fmin, ftol, xtol, pgtol, rescale)
-    return x, nf, rc
+    return array(x), nf, rc
 
 if __name__ == '__main__':
     # Examples for TNC



More information about the Scipy-svn mailing list