Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mystic/abstract_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def SetMultinormalInitialPoints(self, mean, var=None):
else:
try: # scalar ?
float(var)
except: # nope. var better be matrix of the right size (no check)
except (TypeError, ValueError): # nope. var better be matrix of the right size (no check)
pass
else:
var = var * numpy.eye(self.nDim)
Expand Down
2 changes: 1 addition & 1 deletion mystic/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def issolution(constraints, guess, tol=1e-3):
else: # is a constraints solver
try:
constrained = guess.copy()
except:
except AttributeError:
from copy import deepcopy
constrained = deepcopy(guess)
error = 0.0
Expand Down
2 changes: 1 addition & 1 deletion mystic/monitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def _load(path, monitor=None, verbose=False): #XXX: duplicate in mystic.munge?
params = _globals['___params'] if '___params' in _globals else None
cost = _globals['___cost'] if '___cost' in _globals else None
del _globals
except: #XXX: should only catch the appropriate exceptions
except Exception: #XXX: should only catch the appropriate exceptions
raise OSError("error reading '{path}'".format(path=path))

finally:
Expand Down