Skip to content

Commit f784492

Browse files
Tor FjeldeTor Fjelde
authored andcommitted
formatting
1 parent df4feb1 commit f784492

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/RobustAdaptiveMetropolis.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,16 @@ function AbstractMCMC.step(
183183
d = LogDensityProblems.dimension(f)
184184

185185
# Initial parameter state.
186-
T =
187-
initial_params === nothing ? eltype(sampler.γ) :
186+
T = if initial_params === nothing
187+
eltype(sampler.γ)
188+
else
188189
Base.promote_type(eltype(sampler.γ), eltype(initial_params))
189-
x =
190-
initial_params === nothing ? rand(rng, T, d) :
190+
end
191+
x = if initial_params === nothing
192+
rand(rng, T, d)
193+
else
191194
convert(AbstractVector{T}, initial_params)
195+
end
192196
# Initialize the Cholesky factor of the covariance matrix.
193197
S = LinearAlgebra.LowerTriangular(
194198
sampler.S === nothing ? LinearAlgebra.diagm(0 => ones(T, d)) :

0 commit comments

Comments
 (0)