Skip to content

Commit

Permalink
Automatic reformat of code
Browse files Browse the repository at this point in the history
Signed-off-by: code_reformat <>
Signed-off-by: t.hajimohammadloo <t.hajimohammadloo@shell.com>
  • Loading branch information
code_reformat authored and TannazH committed Jun 18, 2024
1 parent 682a0d0 commit 353dfbf
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions tests/test_mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ def fix_state(request):

@pytest.fixture(
params=[(0, 4000, 1), (2000, 4000, 5), (0, 6000, 10), (2000, 6000, 1)],
ids=["n_burn=0,n_iter=4000, n_thin=1",
"n_burn=non-zero,n_iter=4000,n_thin=5",
"n_burn=0,n_iter=6000, n_thin=10",
"n_burn=non-zero,n_iter=6000,n_thin=1"],
ids=[
"n_burn=0,n_iter=4000, n_thin=1",
"n_burn=non-zero,n_iter=4000,n_thin=5",
"n_burn=0,n_iter=6000, n_thin=10",
"n_burn=non-zero,n_iter=6000,n_thin=1",
],
name="mcmc_settings",
)
def fix_mcmc_settings(request):
Expand Down Expand Up @@ -108,10 +110,14 @@ def mock_log_p(self, current_state):
monkeypatch.setattr(NormalGamma, "store", mock_store)
monkeypatch.setattr(Model, "log_p", mock_log_p)

M = MCMC(state, sampler, model,
n_burn=mcmc_settings["nburn"],
n_iter=mcmc_settings["niter"],
n_thin=mcmc_settings["nthin"])
M = MCMC(
state,
sampler,
model,
n_burn=mcmc_settings["nburn"],
n_iter=mcmc_settings["niter"],
n_thin=mcmc_settings["nthin"],
)
M.store["count"] = 0
M.run_mcmc()
assert M.state["count"] == (M.n_iter + M.n_burn) * len(sampler) * M.n_thin
Expand Down

0 comments on commit 353dfbf

Please sign in to comment.