Skip to content

Commit ee9c057

Browse files
committed
fix: retain type for rand(::SymmetricAlphaStable)
1 parent 1322da4 commit ee9c057

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/AlphaStableDistributions.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ end
237237
Distributions.params(d::SymmetricAlphaStable) = (d.α, d.scale, d.location)
238238
Distributions.cf(d::SymmetricAlphaStable, t::Real) = cf(AlphaStable(d), t)
239239
Random.rand(rng::AbstractRNG, d::SymmetricAlphaStable) = rand(rng, AlphaStable(d))
240+
Base.eltype(::Type{<:SymmetricAlphaStable{T}}) where {T<:AbstractFloat} = T
240241

241242
function AlphaStable(d::SymmetricAlphaStable)
242243
AlphaStable=d.α,scale=d.scale,location=d.location)

0 commit comments

Comments
 (0)