Skip to content

Commit c93b5d7

Browse files
committed
add comment for entropy on LocationScale
1 parent 9062431 commit c93b5d7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/families/location_scale.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Base.eltype(::Type{<:MvLocationScale{S, D, L}}) where {S, D, L} = eltype(D)
6767
function StatsBase.entropy(q::MvLocationScale)
6868
@unpack location, scale, dist = q
6969
n_dims = length(location)
70+
# `convert` is necessary because `entropy` is not type stable upstream
7071
n_dims*convert(eltype(location), entropy(dist)) + logdet(scale)
7172
end
7273

0 commit comments

Comments
 (0)