Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
yebai committed Jul 26, 2019
1 parent 1b434e5 commit 4e123a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/adaptation/precond.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ end
AdvancedHMC.adapt!(pc1, θ, 1.)
AdvancedHMC.adapt!(pc2, θ, 1.)
AdvancedHMC.adapt!(pc3, θ, 1.)
@test AdvancedHMC.Adaptation.getM⁻¹(pc2) == zeros(length(θ))
@test AdvancedHMC.Adaptation.getM⁻¹(pc2) == ones(length(θ))
@test AdvancedHMC.Adaptation.getM⁻¹(pc3) == LinearAlgebra.diagm(0 => ones(length(θ)))
end

Expand All @@ -75,6 +75,6 @@ end
AdvancedHMC.adapt!(adaptor1, θ, 1.)
AdvancedHMC.adapt!(adaptor2, θ, 1.)
AdvancedHMC.adapt!(adaptor3, θ, 1.)
@test AdvancedHMC.Adaptation.getM⁻¹(adaptor2) == zeros(length(θ))
@test AdvancedHMC.Adaptation.getM⁻¹(adaptor2) == ones(length(θ))
@test AdvancedHMC.Adaptation.getM⁻¹(adaptor3) == LinearAlgebra.diagm(0 => ones(length(θ)))
end

0 comments on commit 4e123a1

Please sign in to comment.