Skip to content

Commit

Permalink
Dispatch reconstruct for Inverse{PDVecBijector} (#502)
Browse files Browse the repository at this point in the history
* add `reconstruct` method for `Inverse{PDVecBijector}`

* Update Project.toml

---------

Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com>
  • Loading branch information
harisorgn and yebai committed Jul 20, 2023
1 parent 446f06d commit 74849d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
@@ -1,6 +1,6 @@
name = "DynamicPPL"
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
version = "0.23.4"
version = "0.23.5"

[deps]
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
Expand Down
6 changes: 6 additions & 0 deletions src/utils.jl
Expand Up @@ -243,6 +243,12 @@ function reconstruct(
return copy(val)
end

function reconstruct(
::Inverse{Bijectors.PDVecBijector}, ::MatrixDistribution, val::AbstractVector
)
return copy(val)
end

# TODO: Implement no-op `reconstruct` for general array variates.

reconstruct(d::Distribution, val::AbstractVector) = reconstruct(size(d), val)
Expand Down

2 comments on commit 74849d4

@yebai
Copy link
Member

@yebai yebai commented on 74849d4 Jul 20, 2023

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/87875

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.23.5 -m "<description of version>" 74849d47a5fcf8fb3c307f6bbc920a5a9b8f8e75
git push origin v0.23.5

Please sign in to comment.