Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing logpdf #256

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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