Changeset 739

Show
Ignore:
Timestamp:
09/07/10 08:47:17 (1 year ago)
Author:
dmitrey
Message:

some bugfixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PythonPackages/FuncDesigner/FuncDesigner/ooSystem.py

    r738 r739  
    188188        # access by elements and their names 
    189189 
    190  
    191190simplify = lambda val: asscalar(val) if isinstance(val, ndarray) and val.size == 1 else val 
    192191 
  • PythonPackages/FuncDesigner/FuncDesigner/ooVar.py

    r734 r739  
    2020            kwargs['name'] = name 
    2121        oofun.__init__(self, lambda *ARGS: None, *args, **kwargs) 
    22          
     22     
     23     
    2324    def _getFuncCalcEngine(self, x, **kwargs): 
     25        if hasattr(x, 'xf'):return x.xf[self] 
    2426        r = x.get(self, None) 
    2527        if r is not None:  
  • PythonPackages/OpenOpt/openopt/solvers/UkrOpt/ralg_oo.py

    r737 r739  
    119119#        B_f = diag(ones(n)) 
    120120#        B_constr = diag(ones(n)) 
    121         hs = T(h0
     121        hs = asarray(h0, T
    122122        ls_arr = [] 
    123         w = T(1.0/alp-1.0
     123        w = asarray(1.0/alp-1.0, T
    124124 
    125125        """                            Shor r-alg engine                           """ 
    126         bestPoint = p.point(atleast_1d(T(copy(x0)))) 
     126        bestPoint = p.point(asarray(copy(x0), T)) 
    127127        prevIter_best_ls_point = bestPoint 
    128128        prevIter_PointForDilation = bestPoint 
     
    622622                    vec1 = economyMult(b, g).reshape(-1,1)# TODO: remove economyMult, use dot? 
    623623                    #if alp_addition != 0: p.debugmsg('alp_addition:' + str(alp_addition)) 
    624                     w = T(1.0/(alp+alp_addition)-1.0)  
     624                    w = asarray(1.0/(alp+alp_addition)-1.0, T)  
    625625                    vec2 = w * g.T 
    626626                    b += p.matmult(vec1, vec2)