Skip to content

Commit 72eb0c1

Browse files
authored
Fix random test errors (#1469)
1 parent da6da4d commit 72eb0c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/core/container.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ include(dir*"/test/test_utils/AllUtils.jl")
5353
@test pc.logWs == logps
5454
@test getweights(pc) exp.(logps) ./ sum(exp, logps)
5555
@test all(getweight(pc, i) exp(logps[i]) / sum(exp, logps) for i in 1:3)
56-
@test logZ(pc) == log(sum(exp, logps))
56+
@test logZ(pc) log(sum(exp, logps))
5757

5858
# Reweight particles.
5959
reweight!(pc)
6060
@test all(iszero(getlogp(particle.vi)) for particle in pc.vals)
6161
@test pc.logWs == 2 .* logps
6262
@test getweights(pc) == exp.(2 .* logps) ./ sum(exp, 2 .* logps)
6363
@test all(getweight(pc, i) exp(2 * logps[i]) / sum(exp, 2 .* logps) for i in 1:3)
64-
@test logZ(pc) == log(sum(exp, 2 .* logps))
64+
@test logZ(pc) log(sum(exp, 2 .* logps))
6565

6666
# Resample and propagate particles.
6767
resample_propagate!(pc)
@@ -78,7 +78,7 @@ include(dir*"/test/test_utils/AllUtils.jl")
7878
@test pc.logWs logps
7979
@test getweights(pc) == exp.(pc.logWs) ./ sum(exp, pc.logWs)
8080
@test all(getweight(pc, i) exp(pc.logWs[i]) / sum(exp, pc.logWs) for i in 1:3)
81-
@test logZ(pc) == log(sum(exp, pc.logWs))
81+
@test logZ(pc) log(sum(exp, pc.logWs))
8282

8383
# Increase unnormalized logarithmic weights.
8484
logws = copy(pc.logWs)

0 commit comments

Comments
 (0)