You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
support(d::Union{D,Type{D}}) where {D<:DiscreteUnivariateDistribution} = round(Int, minimum(d)):round(Int, maximum(d))
since maximum(Poisson(1)) returns Inf, and round(Int, Inf) gives an InexactError.
One solution is to drop the rounding in the above line, but then the support of a discrete distribution is a RealInterval, which is not great. The root problem is probably that there is no Inf of integer type in Julia.
The text was updated successfully, but these errors were encountered:
Example:
support(Poisson(1)) # gives ERROR: InexactError: trunc(Int64, Inf)
The issue is with the line
support(d::Union{D,Type{D}}) where {D<:DiscreteUnivariateDistribution} = round(Int, minimum(d)):round(Int, maximum(d))
since maximum(Poisson(1)) returns Inf, and round(Int, Inf) gives an InexactError.
One solution is to drop the rounding in the above line, but then the support of a discrete distribution is a RealInterval, which is not great. The root problem is probably that there is no Inf of integer type in Julia.
The text was updated successfully, but these errors were encountered: