Changeset df29bc2 in sasview for src/sas/sascalc/fit
- Timestamp:
- May 1, 2017 6:35:48 PM (8 years ago)
- Parents:
- 658dd57 (diff), 733cdcd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Andrew Nelson <andyfaff@…> (05/01/17 18:35:48)
- git-committer:
- GitHub <noreply@…> (05/01/17 18:35:48)
- Location:
- src/sas/sascalc/fit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/AbstractFitEngine.py
ra1b8fee r0cc77d8 251 251 msg = "FitData1D: invalid error array " 252 252 msg += "%d <> %d" % (np.shape(self.dy), np.size(fx)) 253 raise RuntimeError , msg253 raise RuntimeError(msg) 254 254 return (self.y[self.idx] - fx[self.idx]) / self.dy[self.idx], fx[self.idx] 255 255 -
src/sas/sascalc/fit/Loader.py
ra1b8fee r0cc77d8 59 59 # Sanity check 60 60 if not len(self.x) == len(self.dx): 61 raise ValueError , "x and dx have different length"61 raise ValueError("x and dx have different length") 62 62 if not len(self.y) == len(self.dy): 63 raise ValueError , "y and dy have different length"63 raise ValueError("y and dy have different length") 64 64 65 65 -
src/sas/sascalc/fit/MultiplicationModel.py
r7432acb rb9d74f3 245 245 return 246 246 247 raise ValueError , "Model does not contain parameter %s" % name247 raise ValueError("Model does not contain parameter %s" % name) 248 248 249 249 -
src/sas/sascalc/fit/expression.py
ra1b8fee r0cc77d8 239 239 if independent == emptyset: 240 240 cycleset = ", ".join(str(s) for s in left) 241 raise ValueError ,"Cyclic dependencies amongst %s"%cycleset241 raise ValueError("Cyclic dependencies amongst %s"%cycleset) 242 242 243 243 # The possibly resolvable items are those that depend on the independents … … 267 267 n.sort() 268 268 items = list(items); items.sort() 269 raise Exception ,"%s expect %s to contain %s for %s"%(msg,n,items,pairs)269 raise Exception("%s expect %s to contain %s for %s"%(msg,n,items,pairs)) 270 270 for lo,hi in pairs: 271 271 if lo in n and hi in n and n.index(lo) >= n.index(hi): 272 raise Exception ,"%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs)272 raise Exception("%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs)) 273 273 274 274 def test_deps(): … … 290 290 try: n = order_dependencies(pairs) 291 291 except ValueError: pass 292 else: raise Exception ,"test3 expect ValueError exception for %s"%(pairs,)292 else: raise Exception("test3 expect ValueError exception for %s"%(pairs,)) 293 293 294 294 # large test for gross speed check -
src/sas/sascalc/fit/pluginmodel.py
r5213d22 rb9d74f3 35 35 return self.function(x_val)*self.function(y_val) 36 36 elif x.__class__.__name__ == 'tuple': 37 raise ValueError , "Tuples are not allowed as input to BaseComponent models"37 raise ValueError("Tuples are not allowed as input to BaseComponent models") 38 38 else: 39 39 return self.function(x) … … 52 52 return self.function(x[0])*self.function(x[1]) 53 53 elif x.__class__.__name__ == 'tuple': 54 raise ValueError , "Tuples are not allowed as input to BaseComponent models"54 raise ValueError("Tuples are not allowed as input to BaseComponent models") 55 55 else: 56 56 return self.function(x)
Note: See TracChangeset
for help on using the changeset viewer.