Skip to content

Commit d1838f1

Browse files
committed
Add fixed_param check before assembling draws
1 parent a526c08 commit d1838f1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmdstanpy/stanfit/mcmc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,10 @@ def _assemble_draws(self) -> None:
436436
num_draws += self.num_draws_warmup
437437
self._draws = np.empty(
438438
(num_draws, self.chains, len(self.column_names)),
439-
dtype=float,
439+
dtype=np.float32,
440440
order='F',
441441
)
442-
self._step_size = np.empty(self.chains, dtype=float)
442+
self._step_size = np.empty(self.chains, dtype=np.float32)
443443

444444
mass_matrix_per_chain = []
445445
for chain in range(self.chains):
@@ -455,7 +455,7 @@ def _assemble_draws(self) -> None:
455455
) = stancsv.parse_hmc_adaptation_lines(comments)
456456
mass_matrix_per_chain.append(mass_matrix)
457457

458-
if mass_matrix_per_chain[0] is not None:
458+
if not self._is_fixed_param and mass_matrix_per_chain[0] is not None:
459459
mm_shape = mass_matrix_per_chain[0].shape
460460
if self.metric_type == "diag_e":
461461
mm_shape = mm_shape[1:]

0 commit comments

Comments
 (0)