Changeset df29bc2 in sasview for src/sas/sascalc/fit


Ignore:
Timestamp:
May 1, 2017 6:35:48 PM (8 years ago)
Author:
GitHub <noreply@…>
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)
Message:

Merge 733cdcd4ded452b8ad3afdec13db1f91a354aba4 into 658dd573a2872185ffe7439d96b51458fb88a94d

Location:
src/sas/sascalc/fit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/fit/AbstractFitEngine.py

    ra1b8fee r0cc77d8  
    251251            msg = "FitData1D: invalid error array " 
    252252            msg += "%d <> %d" % (np.shape(self.dy), np.size(fx)) 
    253             raise RuntimeError, msg 
     253            raise RuntimeError(msg) 
    254254        return (self.y[self.idx] - fx[self.idx]) / self.dy[self.idx], fx[self.idx] 
    255255             
  • src/sas/sascalc/fit/Loader.py

    ra1b8fee r0cc77d8  
    5959            # Sanity check 
    6060            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") 
    6262            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") 
    6464             
    6565             
  • src/sas/sascalc/fit/MultiplicationModel.py

    r7432acb rb9d74f3  
    245245                    return 
    246246 
    247         raise ValueError, "Model does not contain parameter %s" % name 
     247        raise ValueError("Model does not contain parameter %s" % name) 
    248248 
    249249 
  • src/sas/sascalc/fit/expression.py

    ra1b8fee r0cc77d8  
    239239        if independent == emptyset: 
    240240            cycleset = ", ".join(str(s) for s in left) 
    241             raise ValueError,"Cyclic dependencies amongst %s"%cycleset 
     241            raise ValueError("Cyclic dependencies amongst %s"%cycleset) 
    242242 
    243243        # The possibly resolvable items are those that depend on the independents 
     
    267267        n.sort() 
    268268        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)) 
    270270    for lo,hi in pairs: 
    271271        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)) 
    273273 
    274274def test_deps(): 
     
    290290    try: n = order_dependencies(pairs) 
    291291    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,)) 
    293293 
    294294    # large test for gross speed check 
  • src/sas/sascalc/fit/pluginmodel.py

    r5213d22 rb9d74f3  
    3535            return self.function(x_val)*self.function(y_val) 
    3636        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") 
    3838        else: 
    3939            return self.function(x) 
     
    5252            return self.function(x[0])*self.function(x[1]) 
    5353        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") 
    5555        else: 
    5656            return self.function(x) 
Note: See TracChangeset for help on using the changeset viewer.