Skip to content

Commit ea53111

Browse files
authored
Dev (#52)
Make likelihoods work with Distributions
1 parent 02da105 commit ea53111

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MeasureBase"
22
uuid = "fa1605e6-acd5-459c-a1e6-7e635759db14"
33
authors = ["Chad Scherrer <[email protected]> and contributors"]
4-
version = "0.9.0"
4+
version = "0.9.1"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

src/combinators/likelihood.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,13 @@ end
137137
insupport(ℓ::AbstractLikelihood, p) = insupport(ℓ.k(p), ℓ.x)
138138

139139
@inline function logdensityof(ℓ::AbstractLikelihood, p)
140-
result = dynamic(unsafe_logdensityof(ℓ, p))
141-
ifelse(insupport(ℓ, p) == true, result, oftype(result, -Inf))
140+
logdensityof(ℓ.k(p), ℓ.x)
142141
end
143142

144143
@inline function unsafe_logdensityof(ℓ::AbstractLikelihood, p)
145144
return unsafe_logdensityof(ℓ.k(p), ℓ.x)
146145
end
147146

148-
149147
# basemeasure(ℓ::Likelihood) = @error "Likelihood requires local base measure"
150148

151149
export likelihood

0 commit comments

Comments
 (0)