Skip to content

Commit e7ccfe2

Browse files
refactor: moved sample step inside if-block
1 parent d031008 commit e7ccfe2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pymc_extras/inference/INLA/inla.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ def fit_INLA(
3434
marginal_model = marginalize(model, x, use_laplace=True, **marginalize_kwargs)
3535

3636
# Sample over the hyperparameters
37-
idata = pm.sample(model=marginal_model, **sampler_kwargs)
38-
3937
if not return_latent_posteriors:
38+
idata = pm.sample(model=marginal_model, **sampler_kwargs)
4039
return idata
4140

4241
# Unmarginalize stuff

0 commit comments

Comments
 (0)