Skip to content

Commit 09a0798

Browse files
committed
float32 compatability
1 parent 8bc8e7d commit 09a0798

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/matrix/inversewishart.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ end
108108
# -----------------------------------------------------------------------------
109109

110110
function invwishart_logc0(df::Real, Ψ::AbstractPDMat)
111-
h_df = df / 2
112111
p = size(Ψ, 1)
113-
logdet_Ψ = logdet(Ψ)
112+
logdet_Ψ, _df = promote(logdet(Ψ), df)
113+
h_df = _df / 2
114114
-h_df * (p * oftype(logdet_Ψ, logtwo) - logdet_Ψ) - logmvgamma(p, h_df)
115115
end
116116

0 commit comments

Comments
 (0)