Skip to content

Commit

Permalink
Fixed incorrect reference in DistributionsAD extension (#299)
Browse files Browse the repository at this point in the history
* fixed incorrect reference in DistributionsAD extension

* bump patch version

* added tests for #298

* bump patch version
  • Loading branch information
torfjelde authored Apr 19, 2024
1 parent e522155 commit 0839209
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ext/BijectorsDistributionsADExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions test/distributionsad.jl
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

2 comments on commit 0839209

@torfjelde
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/105219

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.13.10 -m "<description of version>" 08392094bb28f19b02f039685956b4d05f8a69a3
git push origin v0.13.10

Please sign in to comment.