[Scipy-svn] r3038 - in trunk/Lib/optimize: . tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu May 24 04:08:35 EDT 2007
Author: stefan
Date: 2007-05-24 03:08:11 -0500 (Thu, 24 May 2007)
New Revision: 3038
Modified:
trunk/Lib/optimize/tests/test_optimize.py
trunk/Lib/optimize/tnc.py
Log:
Minor cosmetic changes.
Modified: trunk/Lib/optimize/tests/test_optimize.py
===================================================================
--- trunk/Lib/optimize/tests/test_optimize.py 2007-05-24 08:01:29 UTC (rev 3037)
+++ trunk/Lib/optimize/tests/test_optimize.py 2007-05-24 08:08:11 UTC (rev 3038)
@@ -153,7 +153,7 @@
dif[0] = -2.0*(x[0]*(dif[1]-1.0)+1.0)
return f, dif
self.tests.append((test2fg, [-2,1], [(-inf,None),(1.5,None)],
- [-1.2210262419616387,1.5]))
+ [-1.2210262419616387,1.5]))
def test3fg(x):
f = x[1]+pow(x[1]-x[0],2)*1.0e-5
@@ -199,7 +199,7 @@
dif[3] = (180.0*(x[3]-pow(x[2],2))+20.2\
*(x[3]-1.0)+19.8*(x[1]-1.0))*1.0e-5
return f, dif
- self.tests.append ((test38fg, [-3,-1,-3,-1], [(-10,10)]*4, [1]*4))
+ self.tests.append((test38fg, [-3,-1,-3,-1], [(-10,10)]*4, [1]*4))
def test45fg(x):
f = 2.0-x[0]*x[1]*x[2]*x[3]*x[4]/120.0
@@ -210,8 +210,8 @@
dif[3] = -x[0]*x[1]*x[2]*x[4]/120.0
dif[4] = -x[0]*x[1]*x[2]*x[3]/120.0
return f, dif
- self.tests.append ((test45fg, [2]*5, [(0,1),(0,2),(0,3),(0,4),(0,5)],
- [1,2,3,4,5]))
+ self.tests.append((test45fg, [2]*5, [(0,1),(0,2),(0,3),(0,4),(0,5)],
+ [1,2,3,4,5]))
def test_tnc(self):
for fg, x, bounds, xopt in self.tests:
Modified: trunk/Lib/optimize/tnc.py
===================================================================
--- trunk/Lib/optimize/tnc.py 2007-05-24 08:01:29 UTC (rev 3037)
+++ trunk/Lib/optimize/tnc.py 2007-05-24 08:08:11 UTC (rev 3038)
@@ -104,9 +104,9 @@
approx_grad : bool
If true, approximate the gradient numerically.
bounds : list
- (min, max) pairs for each element in x, defining the
- bounds on that parameter. Use None for one of min or
- max when there is no bound in that direction
+ (min, max) pairs for each element in x, defining the
+ bounds on that parameter. Use None for one of min or max
+ when there is no bound in that direction
scale : list of floats
Scaling factors to apply to each variable. If None, the
factors are up-low for interval bounded variables and
More information about the Scipy-svn
mailing list