Ignore:
Timestamp:
08/25/10 13:40:01 (6 years ago)
Author:
mmckerns
Message:

reduce scipy function copies (and likely delay due to importing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alta/mystic-0.2a1/scipy_cg.py

    r418 r419  
    5858 
    5959from _scipyoptimize import zoom, _cubicmin, _quadmin, _epsilon 
    60 from _scipyoptimize import line_search, approx_fprime 
     60from _scipyoptimize import linesearch, line_search, approx_fprime 
    6161 
    6262########################################################################## 
     
    225225            old_old_fval_backup = old_old_fval 
    226226 
    227            # NOTE: Without scipy.optimize's linesearch, results may be noticeably worse. 
    228             try:   
    229                 import scipy.optimize 
    230                 alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \ 
    231                 scipy.optimize.linesearch.line_search(func,myfprime,xk,pk,gfk,\ 
    232                                       old_fval,old_old_fval,c2=0.4) 
    233             except ImportError: 
    234                 alpha_k = None 
    235             #XXX Signal handler 'exit' won't work if it gets stuck inside scipy linesearch 
     227            alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \ 
     228                             linesearch.line_search(func,myfprime,xk,pk,gfk,\ 
     229                             old_fval,old_old_fval,c2=0.4) 
     230            #XXX Signal handler 'exit' won't work 
     231            # if it gets stuck inside scipy linesearch 
    236232            #alpha_k = None 
    237233 
Note: See TracChangeset for help on using the changeset viewer.