Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 94bacfe

Browse files
ahartikainenriddell-stan
authored andcommitted
reshape with Fortran order (#649)
1 parent bd2fe46 commit 94bacfe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pystan/misc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ def _summary_sim(sim, pars, probs):
340340
msd = np.row_stack([x['msd'] for x in lmsdq])
341341
quan = np.row_stack([x['quan'] for x in lmsdq])
342342
probs_str = tuple(["{:g}%".format(100*p) for p in probs])
343-
msd.shape = (tidx_len, 2)
344-
quan.shape = (tidx_len, probs_len)
343+
msd = msd.reshape(tidx_len, 2, order='F')
344+
quan = quan.reshape(tidx_len, probs_len, order='F')
345345

346346
c_msd = np.row_stack([x['c_msd'] for x in lmsdq])
347347
c_quan = np.row_stack([x['c_quan'] for x in lmsdq])
348-
c_msd.shape = (tidx_len, 2, n_chains)
349-
c_quan.shape = (tidx_len, probs_len, n_chains)
348+
c_msd = c_msd.reshape(tidx_len, 2, n_chains, order='F')
349+
c_quan = c_quan.reshape(tidx_len, probs_len, n_chains, order='F')
350350
sim_attr_args = sim.get('args', None)
351351
if sim_attr_args is None:
352352
cids = list(range(n_chains))

0 commit comments

Comments
 (0)