Commit a34a2cca authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

small bug fix

parent 31a75c03
......@@ -89,7 +89,7 @@ class MLMCMpp(Mpp):
def parse_mlmc_table(self, log_content):
float_pattern = self.create_float_pattern()
columns = ["eps", "value", "MLMC cost", "MC cost", "l", "M"]
columns = ['eps', 'value', 'MLMC cost', 'MC cost', 'l', 'M']
df = pd.DataFrame(columns=columns)
ctr = 0
......@@ -219,8 +219,8 @@ class MLMCMpp(Mpp):
self.plot_convergence_table(df, axes, label)
if plot_name is not None:
path = self.PROJECT_PY_DATA_DIR + 'Convergence_{}_{}.png'.format(plot_name,
self.now)
path = self.PROJECT_PY_DATA_DIR + '/Convergence_{}_{}.png'.format(plot_name,
self.now)
plt.savefig(path)
else:
plt.show()
......@@ -264,7 +264,7 @@ class MLMCMpp(Mpp):
return df
def print_convergence_table(self, df=None):
self.create_convergence_table_from_log(df)
df = self.create_convergence_table_from_log(df)
self.prepare_pd_table()
print(df)
......@@ -274,10 +274,10 @@ class MLMCMpp(Mpp):
print(df)
def save_convergence_table(self, df=None, table_name=None):
self.create_convergence_table_from_log(df)
path = self.PROJECT_PY_DATA_DIR + 'Convergence_{}_{}.csv'.format(table_name,
self.now)
df.to_csv(path)
df_ = self.create_convergence_table_from_log(df)
path = self.PROJECT_PY_DATA_DIR + '/Convergence_{}_{}.csv'.format(table_name,
self.now)
df_.to_csv(path)
def save_mlmc_table(self, df, table_name=None):
self.create_mlmc_table(df)
......
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