Ignore:
Timestamp:
08/26/10 14:25:50 (6 years ago)
Author:
mmckerns
Message:

cg & bfgs now work regardless if fprime provides list or ndarray

File:
1 edited

Legend:

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

    r420 r421  
    187187            gcalls, myfprime = wrap_function(fprime, args, Null) 
    188188 
    189         gfk = myfprime(x0) 
     189        gfk = asarray(myfprime(x0)) 
    190190        k = 0 
    191191        N = len(x0) 
     
    245245            if gfkp1 is None: 
    246246                gfkp1 = myfprime(xk) 
     247            gfkp1 = asarray(gfkp1) 
    247248            yk = gfkp1 - gfk 
    248249            beta_k = max(0,numpy.dot(yk,gfkp1)/deltak) 
Note: See TracChangeset for help on using the changeset viewer.