diff --git a/Project.toml b/Project.toml index 5c42849..6255f3c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ConditionalDists" uuid = "c648c4dd-c1e0-49a6-84b9-144ae7fd2468" authors = ["Niklas Heim "] -version = "0.4.3" +version = "0.4.4" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" diff --git a/src/batch_mvnormal.jl b/src/batch_mvnormal.jl index 2536232..00d8660 100644 --- a/src/batch_mvnormal.jl +++ b/src/batch_mvnormal.jl @@ -36,5 +36,5 @@ function Distributions.logpdf(d::BMN, x::AbstractMatrix{T}) where T<:Real n = size(d.μ,1) μ = mean(d) σ2 = var(d) - -(vec(sum(((x - μ).^2) ./ σ2 .+ log.(σ2), dims=1)) .+ n*log(T(2π))) / 2 + -(vec(sum(((x - μ).^2) ./ σ2 .+ log.(σ2), dims=1)) .+ n*log(T(2π))) ./ 2 end