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
true
The 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
true
I think it would be convenient if both maximum and minimum returned the same type T for Pareto{T}.
For distributions with support that contains a constant value (like Pareto), the constant values do not match the
partypeof the underlying distribution instance. This makes working with types likePareto{Float32}trickly becausemaximum(::Pareto{Float32})returns Inf in Float64.The context I encountered this was using a truncated Pareto distribution, where the maximum is not Inf --
I think it would be convenient if both
maximumandminimumreturned the same typeTforPareto{T}.