Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
odunbar committed Jan 30, 2025
1 parent 3f6082d commit f2d70ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/MarkovChainMonteCarlo/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ function mcmc_test_template(
step = 0.25,
rng = Random.GLOBAL_RNG,
)
if !isa(obs_sample,AbstractVector)
if !isa(obs_sample, AbstractVector)
obs_sample = reshape(collect(obs_sample), 1) # scalar or Vector -> Vector
end

init_params = reshape(collect(init_params), 1) # scalar or Vector -> Vector
mcmc = MCMCWrapper(mcmc_alg, obs_sample, prior, em; init_params = init_params)

Expand Down Expand Up @@ -174,7 +174,7 @@ end
@test isapprox(posterior_mean_2, posterior_mean_1; atol = 0.1)

# test with many slightly different samples
obs_sample2 = [obs_sample+0.01*randn(length(obs_sample)) for i =1:100]
obs_sample2 = [obs_sample + 0.01 * randn(length(obs_sample)) for i in 1:100]
mcmc_params2 = mcmc_params
mcmc_params2[:obs_sample] = obs_sample2
em_1 = test_gp_1(y, σ2_y, iopairs)
Expand Down

0 comments on commit f2d70ea

Please # to comment.