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 <[email protected]>
Signed-off-by: david.randell <[email protected]>
  • Loading branch information
davidrandell84 committed Jun 19, 2024
1 parent 6d69147 commit bc6aa1b
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 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,7 +110,6 @@ def mock_log_p(self, current_state):
monkeypatch.setattr(NormalGamma, "store", mock_store)
monkeypatch.setattr(Model, "log_p", mock_log_p)

<<<<<<< HEAD
M = MCMC(
state,
sampler,
Expand All @@ -117,18 +118,6 @@ def mock_log_p(self, current_state):
n_iter=mcmc_settings["niter"],
n_thin=mcmc_settings["nthin"],
)
=======
M = MCMC(state, sampler, model,
<<<<<<< HEAD
n_burn=nburn_niter["nburn"],
n_iter=nburn_niter["niter"],
n_thin=nburn_niter["nthin"])
>>>>>>> b4ba606 (updated unit test to include thinning)
=======
n_burn=mcmc_settings["nburn"],
n_iter=mcmc_settings["niter"],
n_thin=mcmc_settings["nthin"])
>>>>>>> 682a0d0 (renaming the fixture function for iteration. burn and thinning)
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 bc6aa1b

Please sign in to comment.