From ded2cee3be34de4a071bde7569deeff88b3d985a Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Sun, 10 Dec 2023 13:55:44 +0000 Subject: [PATCH 1/4] fixed incorrect reference in DistributionsAD extension --- ext/BijectorsDistributionsADExt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/BijectorsDistributionsADExt.jl b/ext/BijectorsDistributionsADExt.jl index 99534b0c..69dce30a 100644 --- a/ext/BijectorsDistributionsADExt.jl +++ b/ext/BijectorsDistributionsADExt.jl @@ -51,7 +51,7 @@ function Bijectors.bijector(d::FillMatrixOfUnivariate{Continuous}) end Bijectors.bijector(d::MatrixOfUnivariate{Discrete}) = identity function Bijectors.bijector(d::MatrixOfUnivariate{Continuous}) - return TruncatedBijectors.Bijector(_minmax(d.dists)...) + return Bijectors.TruncatedBijector(Bijectors._minmax(d.dists)...) end Bijectors.bijector(d::VectorOfMultivariate{Discrete}) = identity for T in (:VectorOfMultivariate, :FillVectorOfMultivariate) From fca36cd42b0ea71c696265bb9a2978ae89408729 Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Sun, 10 Dec 2023 13:56:23 +0000 Subject: [PATCH 2/4] bump patch version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9df2d5d5..2a7ccaf3 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Bijectors" uuid = "76274a88-744f-5084-9051-94815aaf08c4" -version = "0.13.8" +version = "0.13.9" [deps] ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197" From d46e1c0ca2972c16c58df59afba7828710492769 Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Fri, 19 Apr 2024 08:06:07 +0100 Subject: [PATCH 3/4] added tests for #298 --- test/distributionsad.jl | 7 +++++++ test/runtests.jl | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 test/distributionsad.jl diff --git a/test/distributionsad.jl b/test/distributionsad.jl new file mode 100644 index 00000000..d30fb0dc --- /dev/null +++ b/test/distributionsad.jl @@ -0,0 +1,7 @@ +@testset "DistributionsAD" begin + # https://github.com/TuringLang/Bijectors.jl/issues/298 + @testset "#298" begin + dists = arraydist(fill(InverseGamma(), 2, 2)) + @test bijector(dists) isa Bijectors.TruncatedBijector + end +end diff --git a/test/runtests.jl b/test/runtests.jl index 2cb3b7df..5c4f2df6 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -48,6 +48,8 @@ if GROUP == "All" || GROUP == "Interface" include("bijectors/pd.jl") include("bijectors/reshape.jl") include("bijectors/corr.jl") + + include("distributionsad.jl") end if GROUP == "All" || GROUP == "AD" From 6803bfbba9f87a86a3cdb96548ffb3bdf1475c67 Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Fri, 19 Apr 2024 08:06:40 +0100 Subject: [PATCH 4/4] bump patch version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 2a7ccaf3..5c3db28c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Bijectors" uuid = "76274a88-744f-5084-9051-94815aaf08c4" -version = "0.13.9" +version = "0.13.10" [deps] ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"