Skip to content

Commit e32e4c6

Browse files
authored
Fixed bug in implementation of size
Fixed bug in implementation of `size` for `TuringScalMvNormal`. `size(d::MultivariateDistribution)` should return `(length(d), )` not `(length(d), length(d))`.
1 parent a8c5835 commit e32e4c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/multivariate.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct TuringScalMvNormal{Tm<:AbstractVector, Tσ<:Real} <: ContinuousMultivaria
4444
end
4545

4646
Base.length(d::TuringScalMvNormal) = length(d.m)
47-
Base.size(d::TuringScalMvNormal) = (length(d), length(d))
47+
Base.size(d::TuringScalMvNormal) = (length(d), )
4848
function Distributions.rand(rng::Random.AbstractRNG, d::TuringScalMvNormal)
4949
return d.m .+ d.σ .* randn(rng, length(d))
5050
end

0 commit comments

Comments
 (0)