Skip to content

Commit 93e2092

Browse files
committed
Fix mc output shapes
1 parent 395b791 commit 93e2092

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bin/run_vega_mc_mpi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def print_func(message):
4545
raise ValueError('Warning: You called "run_vega_mc_mpi.py" without asking'
4646
' for monte carlo. Add "run_montecarlo = True" to the "[control]" section.')
4747

48+
# Activate monte carlo mode
49+
vega.monte_carlo = True
50+
4851
# Check if we need to run a forecast
4952
forecast = vega.main_config['control'].getboolean('forecast', False)
5053
if forecast:

vega/output.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ def write_monte_carlo(self, cpu_id=None):
422422
covariances = np.array(self.analysis.mc_covariances)
423423

424424
names = np.array(list(bestfits.keys()))
425-
bestfit_table = np.array([bestfits[name][:, 0] for name in names])
426-
errors_table = np.array([bestfits[name][:, 1] for name in names])
425+
bestfit_table = np.array([bestfits[name][:, 0] for name in names]).T
426+
errors_table = np.array([bestfits[name][:, 1] for name in names]).T
427427
covariances = covariances.reshape(bestfit_table.shape[0]*len(names), len(names))
428428

429429
# Get the data types for the columns

0 commit comments

Comments
 (0)