-
Notifications
You must be signed in to change notification settings - Fork 433
Open
Description
For distributions with support that contains a constant value (like Pareto), the constant values do not match the partype of the underlying distribution instance. This makes working with types like Pareto{Float32} trickly because maximum(::Pareto{Float32}) returns Inf in Float64.
julia> maximum(Pareto(1.4f0, 0.1f0)) === Inf
trueThe context I encountered this was using a truncated Pareto distribution, where the maximum is not Inf --
julia> d = truncated(Pareto(1.4f0, 0.1f0); upper=100.0f0)
julia> minimum(d) isa Float32
true
julia> maximum(d) isa Float64
trueI think it would be convenient if both maximum and minimum returned the same type T for Pareto{T}.
Metadata
Metadata
Assignees
Labels
No labels