TuringLang / docs

Documentation and tutorials for the Turing language
https://turinglang.org/docs/
MIT License
229 stars 99 forks source link

Avoid using deprecated MvNormal constructor #279

Closed rikhuijzer closed 1 year ago

rikhuijzer commented 3 years ago

Currently, multiple tutorials use a deprecated MvNormal constructor (deprecated in https://github.com/JuliaStats/Distributions.jl/pull/1362).

julia> using Distributions

julia> MvNormal([1], 1.0) # Old constructor.
┌ Warning: `MvNormal(μ::AbstractVector{<:Real}, σ::Real)` is deprecated, use `MvNormal(μ, σ ^ 2 * I)` instead.
│   caller = ip:0x0
└ @ Core :-1
IsoNormal(
dim: 1
μ: [1.0]
Σ: [1.0]
)

julia> I = Distributions.I;

julia> MvNormal([1], 1.0^2 * I) # New constructor.
IsoNormal(
dim: 1
μ: [1.0]
Σ: [1.0]
)

The usage of the old constructor has to be removed in the following tutorials: