Changeset 430

Show
Ignore:
Timestamp:
02/06/10 19:38:11 (1 month ago)
Author:
dmitrey
Message:

some fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PythonPackages/OpenOpt/openopt/kernel/FDmisc.py

    r427 r430  
    192 192         # oofuns should be linear 
    193 193         C, d = [], [] 
    194           Z = self._vector2point(zeros(p.n)) 
      194         Z = p._vector2point(zeros(p.n)) 
    195 195         for elem in oofuns: 
    196 196             if elem.isConstraint: 
     
    200 200             if not lin_oofun.is_linear: 
    201 201                 raise OpenOptException("this function hasn't been intended to work with nonlinear FuncDesigner oofuns") 
    202               C.append(self._pointDerivative2array(lin_oofun._D(Z, **self._D_kwargs), asSparse = 'auto')) 
      202             C.append(p._pointDerivative2array(lin_oofun._D(Z, **p._D_kwargs), asSparse = 'auto')) 
    203 203             d.append(-lin_oofun(Z)) 
    204 204              
    205           if any(isspmatrix([elem for elem in C])): 
      205         if any([isspmatrix(elem) for elem in C]): 
    206 206             Vstack = scipy.sparse.vstack 
    207 207         else: 
     
    209 209         #raise 0 
    210 210         C, d = Vstack(C), hstack(d).flatten() 
    211           raise 0 
      211  
    212 212         return C, d     
    213 213     p._linearOOFunsToMatrices = linearOOFunsToMatrices 
  • PythonPackages/OpenOpt/openopt/kernel/LLSP.py

    r428 r430  
    57 57         MatrixProblem.__prepare__(self) 
    58 58         if self.isFDmodel: 
    59               self.C, self.d = p._linearOOFunsToMatrices(self.C) 
      59             self.C, self.d = self._linearOOFunsToMatrices(self.C) 
    60 60 #            C, d = [], [] 
    61 61 #            Z = self._vector2point(zeros(self.n))