Commit d7613c7a authored by Marius Kriegerowski's avatar Marius Kriegerowski

create required directories

parent 72d5d27b
......@@ -130,9 +130,14 @@ class Optimizer(Object):
logger.info('Best parameter loss:')
logger.info(self.result.fun)
def ensure_directory(self, directory):
if not os.path.exists(directory):
os.makedirs(directory)
def plot_results(self):
'''Produce and save result plots. '''
self.ensure_result()
self.ensure_directory(self.extend_path('plots'))
if _plot_histogram_error:
logger.warn(_plot_histogram_error)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment