Skip to content

Inconsistency between single-arg MvNormal and Normal #1203

@sethaxen

Description

@sethaxen

On Distributions v0.24.1, the mean-only constructor for Normal defaults to a variance of 1:

julia> using Distributions

julia> Normal(0)
Normal{Float64}=0.0, σ=1.0)

while the mean-only constructor for MvNormal defaults to a covariance of 0:

julia> MvNormal(zeros(2))
ZeroMeanDiagNormal(
dim: 2
μ: 2-element Zeros{Float64}
Σ: [0.0 0.0; 0.0 0.0]
)

It seems to me that by providing the mean only, the user would usually expect an identity covariance matrix, analogous to Normal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions