Changeset 916
- Timestamp:
- 03/22/08 07:07:53 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openopt/scikits/openopt/Kernel/objFunRelated.py
r841 r916 18 18 if type(x) != ndarray: x = asfarray(x) 19 19 20 if hasattr(p, 'xPrevF') and all(x == p.xPrevF) and ind is None and hasattr(p, 'fPrevF'):20 if hasattr(p, 'xPrevF') and all(x.shape == p.xPrevF.shape) and all(x == p.xPrevF) and ind is None and hasattr(p, 'fPrevF'): 21 21 #TODO: add counter of the situations 22 22 return copy(p.fPrevF) … … 152 152 153 153 def user_c(p, x): 154 if hasattr(p, 'xPrevC') and all(x == p.xPrevC):154 if hasattr(p, 'xPrevC') and all(x.shape == p.xPrevC.shape) and all(x == p.xPrevC): 155 155 return copy(p.cPrevC) 156 156 … … 234 234 235 235 def user_h(p, x): 236 if hasattr(p, 'xPrevH') and all(x == p.xPrevH):236 if hasattr(p, 'xPrevH') and all(x.shape == p.xPrevH.shape) and all(x == p.xPrevH): 237 237 return copy(p.hPrevH) 238 238
