Skip to content

Commit

Permalink
Fix missing logpdf (#256)
Browse files Browse the repository at this point in the history
* Fix missing `logpdf`

* Update Project.toml
  • Loading branch information
yebai authored Aug 4, 2023
1 parent 833e876 commit 5847e86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DistributionsAD"
uuid = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
version = "0.6.51"
version = "0.6.52"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
6 changes: 3 additions & 3 deletions ext/DistributionsADLazyArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Distributions._logpdf(
dist::LazyVectorOfUnivariate,
x::AbstractVector{<:Real},
)
return sum(copy(logpdf.(dist.v, x)))
return sum(copy(Distributions.logpdf.(dist.v, x)))
end

function Distributions.logpdf(
Expand All @@ -31,7 +31,7 @@ function Distributions.logpdf(
)
size(x, 1) == length(dist) ||
throw(DimensionMismatch("Inconsistent array dimensions."))
return vec(sum(copy(logpdf.(dists, x)), dims = 1))
return vec(sum(copy(Distributions.logpdf.(dists, x)), dims = 1))
end

const LazyMatrixOfUnivariate{
Expand All @@ -44,7 +44,7 @@ function Distributions._logpdf(
dist::LazyMatrixOfUnivariate,
x::AbstractMatrix{<:Real},
)
return sum(copy(logpdf.(dist.dists, x)))
return sum(copy(Distributions.logpdf.(dist.dists, x)))
end

DistributionsAD.lazyarray(f, x...) = LazyArray(Base.broadcasted(f, x...))
Expand Down

2 comments on commit 5847e86

@yebai
Copy link
Member Author

@yebai yebai commented on 5847e86 Aug 4, 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/89052

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.6.52 -m "<description of version>" 5847e86f7783ea8f745a7465c2f4f9020c729051
git push origin v0.6.52

Please sign in to comment.