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
Following the discussion on discourse, it seems that the product_distribution does different things based on the argument being a vector or not. Does it call the old Product interface.
Which of the following is the correct way to define a product? The first option returns the most satisfying and detailed type.
# v0.25.65 and above
julia>typeof(product_distribution([Gamma(),Normal()]...))
Distributions.ProductDistribution{1, 0, Tuple{Gamma{Float64}, Normal{Float64}}, Continuous, Float64}
julia>typeof(product_distribution([Gamma(),Normal()]))
Product{Continuous, Distribution{Univariate, Continuous}, Vector{Distribution{Univariate, Continuous}}}
# -> use the old (depreacated) Product interface?
The doc suggests an array should be used (hence the second option, where type is not fully returned).
The text was updated successfully, but these errors were encountered:
Yes, this is expected. ProductDistribution is relatively new and an internal thing, users are supposed to only use product_distribution, analogously to truncated etc. Changing product_distribution(::Vector{<:UnivariateDistribution}) from returning a Product to a ProductDistribution would have been breaking, so only previously unsupported arguments return a ProductDistribution until a new breaking release of Distributions is made (which I don't expect anytime in the near future).
Following the discussion on discourse, it seems that the
product_distribution
does different things based on the argument being a vector or not. Does it call the oldProduct
interface.Which of the following is the correct way to define a product? The first option returns the most satisfying and detailed type.
The doc suggests an array should be used (hence the second option, where type is not fully returned).
The text was updated successfully, but these errors were encountered: