From a297dfaf8d881e2b3f262ae3d52cb330983fbf34 Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Sun, 24 Jul 2022 09:49:15 +0100 Subject: [PATCH 1/2] replace Product with product_distributions --- Project.toml | 2 +- src/arraydist.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index b1fe718..c82c202 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DistributionsAD" uuid = "ced4e74d-a319-5a8a-b0ac-84af2272839c" -version = "0.6.41" +version = "0.6.42" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/arraydist.jl b/src/arraydist.jl index c358834..d07ae55 100644 --- a/src/arraydist.jl +++ b/src/arraydist.jl @@ -3,7 +3,7 @@ const VectorOfUnivariate = Distributions.Product function arraydist(dists::AbstractVector{<:UnivariateDistribution}) - return Product(dists) + return product_distribution(dists) end struct MatrixOfUnivariate{ From 60ec897ce5f1c4a58bab90b4e5b4b315b972d156 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Mon, 8 Aug 2022 12:43:50 +0200 Subject: [PATCH 2/2] Avoid changing return type --- src/arraydist.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/arraydist.jl b/src/arraydist.jl index d07ae55..f4d5cdc 100644 --- a/src/arraydist.jl +++ b/src/arraydist.jl @@ -3,7 +3,10 @@ const VectorOfUnivariate = Distributions.Product function arraydist(dists::AbstractVector{<:UnivariateDistribution}) - return product_distribution(dists) + V = typeof(dists) + T = eltype(dists) + S = Distributions.value_support(T) + return Product{S,T,V}(dists) end struct MatrixOfUnivariate{