in contactopt/run_eval.py [0:0]
def calc_mean_dicts(all_dicts, phase=''):
keys = all_dicts[0].keys()
mean_dict = dict()
stds = ['pen_vol']
for k in keys:
l = list()
for d in all_dicts:
l.append(d[k])
mean_dict[k] = np.array(l).mean()
if k in stds:
mean_dict[k + '_std'] = np.array(l).std()
return mean_dict