@@ -32,7 +32,7 @@ function TuringDirichlet(alpha::AbstractVector{T}) where {T <: Integer}
32
32
Tf = float (T)
33
33
TuringDirichlet (convert (AbstractVector{Tf}, alpha))
34
34
end
35
- TuringDirichlet (d:: Integer , alpha:: Integer ) = TuringDirichlet (d, Float64 (alpha))
35
+ TuringDirichlet (d:: Integer , alpha:: Integer ) = TuringDirichlet (d, float (alpha))
36
36
37
37
Distributions. Dirichlet (alpha:: TrackedVector ) = TuringDirichlet (alpha)
38
38
Distributions. Dirichlet (d:: Integer , alpha:: TrackedReal ) = TuringDirichlet (d, alpha)
119
119
Distributions. params (d:: TuringDiagMvNormal ) = (d. m, d. σ)
120
120
Distributions. dim (d:: TuringDiagMvNormal ) = length (d. m)
121
121
Base. length (d:: TuringDiagMvNormal ) = length (d. m)
122
- Base. size (d:: TuringDiagMvNormal ) = (length (d), length (d) )
122
+ Base. size (d:: TuringDiagMvNormal ) = (length (d),)
123
123
Distributions. rand (d:: TuringDiagMvNormal , n:: Int... ) = rand (Random. GLOBAL_RNG, d, n... )
124
124
function Distributions. rand (rng:: Random.AbstractRNG , d:: TuringDiagMvNormal , n:: Int... )
125
125
return d. m .+ d. σ .* randn (rng, length (d), n... )
@@ -131,7 +131,7 @@ struct TuringScalMvNormal{Tm<:AbstractVector, Tσ<:Real} <: ContinuousMultivaria
131
131
end
132
132
133
133
Base. length (d:: TuringScalMvNormal ) = length (d. m)
134
- Base. size (d:: TuringScalMvNormal ) = (length (d), length (d) )
134
+ Base. size (d:: TuringScalMvNormal ) = (length (d),)
135
135
Distributions. rand (d:: TuringScalMvNormal , n:: Int... ) = rand (Random. GLOBAL_RNG, d, n... )
136
136
function Distributions. rand (rng:: Random.AbstractRNG , d:: TuringScalMvNormal , n:: Int... )
137
137
return d. m .+ d. σ .* randn (rng, length (d), n... )
0 commit comments