We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df4feb1 commit f784492Copy full SHA for f784492
src/RobustAdaptiveMetropolis.jl
@@ -183,12 +183,16 @@ function AbstractMCMC.step(
183
d = LogDensityProblems.dimension(f)
184
185
# Initial parameter state.
186
- T =
187
- initial_params === nothing ? eltype(sampler.γ) :
+ T = if initial_params === nothing
+ eltype(sampler.γ)
188
+ else
189
Base.promote_type(eltype(sampler.γ), eltype(initial_params))
- x =
190
- initial_params === nothing ? rand(rng, T, d) :
+ end
191
+ x = if initial_params === nothing
192
+ rand(rng, T, d)
193
194
convert(AbstractVector{T}, initial_params)
195
196
# Initialize the Cholesky factor of the covariance matrix.
197
S = LinearAlgebra.LowerTriangular(
198
sampler.S === nothing ? LinearAlgebra.diagm(0 => ones(T, d)) :
0 commit comments