Changeset 419 for branches/alta/mystic-0.2a1/scipy_bfgs.py
- Timestamp:
- 08/25/10 13:40:01 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alta/mystic-0.2a1/scipy_bfgs.py
r418 r419 60 60 61 61 from _scipyoptimize import zoom, _cubicmin, _quadmin, _epsilon 62 from _scipyoptimize import line _search, approx_fprime62 from _scipyoptimize import linesearch, line_search, approx_fprime 63 63 64 64 ########################################################################## … … 217 217 pk = -numpy.dot(Hk,gfk) 218 218 219 # If user has scipy installed, use that line search (since line search requires 220 # minpack.so). If scipy is not installed, use 221 # the function line_search (defined above, in helper functions) 222 try: 223 import scipy.optimize 224 alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \ 225 scipy.optimize.linesearch.line_search(func,myfprime,xk,pk,gfk, 226 old_fval,old_old_fval) 227 except ImportError: 228 alpha_k = None 229 #XXX If it gets stuck in the linesearch in scipy, 'exit' in the signal 230 # handler does not work. 219 alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \ 220 linesearch.line_search(func,myfprime,xk,pk,gfk, \ 221 old_fval,old_old_fval) 222 #XXX If it gets stuck in the linesearch in scipy, 223 # 'exit' in the signal handler does not work. 231 224 #alpha_k = None 232 225
Note: See TracChangeset
for help on using the changeset viewer.