[Scipy-svn] r2085 - in trunk/Lib: . optimize
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Jul 12 16:24:11 EDT 2006
Author: oliphant
Date: 2006-07-12 15:24:08 -0500 (Wed, 12 Jul 2006)
New Revision: 2085
Modified:
trunk/Lib/__init__.py
trunk/Lib/optimize/cobyla.py
Log:
Add rand and randn plus debugging prints in cobyla.
Modified: trunk/Lib/__init__.py
===================================================================
--- trunk/Lib/__init__.py 2006-07-12 11:07:19 UTC (rev 2084)
+++ trunk/Lib/__init__.py 2006-07-12 20:24:08 UTC (rev 2085)
@@ -31,9 +31,12 @@
import numpy as _num
from numpy import oldnumeric
from numpy import *
+from numpy.random import rand, randn
__all__ += ['oldnumeric']+_num.__all__
+__all__ += ['randn', 'rand']
+
__doc__ += """
Contents
--------
Modified: trunk/Lib/optimize/cobyla.py
===================================================================
--- trunk/Lib/optimize/cobyla.py 2006-07-12 11:07:19 UTC (rev 2084)
+++ trunk/Lib/optimize/cobyla.py 2006-07-12 20:24:08 UTC (rev 2085)
@@ -67,9 +67,12 @@
def calcfc(x, con):
f = func(x, *args)
k = 0
+ print "x = ", x
+ print "f = ", f
for constraints in cons:
con[k] = constraints(x, *consargs)
k += 1
+ print "con = ", con
return f
xopt = _cobyla.minimize(calcfc, m=m, x=x0, rhobeg=rhobeg, rhoend=rhoend,
More information about the Scipy-svn
mailing list