Open karlwessel opened 4 years ago
Mathematically it is fine. I ran into the same question. Hence I am here. If you define
d1 = Product([DiscreteUniform(1, 5), DiscreteUniform(1, 5)])
and d2 = Product([Uniform(), Uniform()])
, then rand(d1)
produces a vector of Int's, while rand(d2)
produces a vector of Float64's. So d3 = Product([DiscreteUniform(1, 5), Uniform()]); rand(d3)
should produce a vector with an Int and a Float64, which should then be of type Vector{Real}, which is known to be inefficient. Converting Int's to Float64's might also cause trouble. But I am not a developer. It is just my guess. You can, of course, define your own Product type, if appropriate.
If I try to create a product distribution from a discrete distribution and a continuous distribution I get the following error:
The documentation only says that the distributions have to be univariate, but not that they have to have the same
ValueSupport
.Is this a missing feature or something that is not possible (or mathematically sensible) in general?