JuliaStats / Distributions.jl

A Julia package for probability distributions and associated functions.
Other
1.08k stars 410 forks source link

Mixing `UnivariateDistribution`s and `MultivariateDistribution`s in `product_distribution` #1816

Open btmit opened 6 months ago

btmit commented 6 months ago
using Distributions, LinearAlgebra
d1 = Uniform()
d2 = MvNormal(Diagonal([1., 2.]))
d3 = MvNormal(Diagonal([1., 2., 3.]))

It would be really helpful if methods existed to support this type of thing:

a = product_distribution(d1, d2)
b = product_distribution(d2, d3)