Distributions.jl icon indicating copy to clipboard operation
Distributions.jl copied to clipboard

Is there a reason `rand(TDist(nu))` does not obey the type of `nu`?

Open Red-Portal opened this issue 6 months ago • 10 comments

Hi, it seems that

nu = 3f0
rand(TDist(nu))

returns a Float64 instead of a Float32. Is this intended behavior? I find it unusual because the rand implementation tries to be type-stable half way there by using one(T) but ends up calling randn(rng) without specifying the type.

Red-Portal avatar Aug 13 '24 07:08 Red-Portal