Exception fixes for Python 3 compat

This commit is contained in:
Mike Croucher 2015-02-26 13:33:39 +00:00
parent 70c8f4a410
commit c4fb58176d
8 changed files with 25 additions and 25 deletions

View file

@ -223,7 +223,7 @@ class Symbolic_core():
def code_gradients_cacheable(self, function, variable):
if variable not in self.cacheable:
raise RuntimeError, variable + ' must be a cacheable.'
raise RuntimeError(variable + ' must be a cacheable.')
lcode = 'gradients_' + variable + ' = np.zeros_like(' + variable + ')\n'
lcode += 'self.update_cache(' + ', '.join(self.cacheable) + ')\n'
for i, theta in enumerate(self.variables[variable]):