Skip to content

Commit 8591375

Browse files
committed
Accidentally removed the keytype argument
1 parent 49ad8b0 commit 8591375

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/pointwise_logdensities.jl

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ julia> ℓ = pointwise_logdensities(m, VarInfo(m)); first.((ℓ[@varname(x[1])],
294294
295295
"""
296296
function pointwise_logdensities(
297-
model::Model, chain, context::AbstractContext=DefaultContext()
297+
model::Model, chain, context::AbstractContext=DefaultContext(), keytype::Type{T}=String
298298
) where {T}
299299
# Get the data by executing the model once
300300
vi = VarInfo(model)
@@ -339,23 +339,26 @@ including the likelihood terms.
339339
See also: [`pointwise_logdensities`](@ref).
340340
"""
341341
function pointwise_loglikelihoods(
342-
model::Model, chain, context::AbstractContext=LikelihoodContext()
342+
model::Model,
343+
chain,
344+
context::AbstractContext=LikelihoodContext(),
345+
keytype::Type{T}=String,
343346
) where {T}
344347
if !(leafcontext(context) isa LikelihoodContext)
345348
throw(ArgumentError("Leaf context should be a LikelihoodContext"))
346349
end
347350

348-
return pointwise_logdensities(model, chain, context)
351+
return pointwise_logdensities(model, chain, context, keytype)
349352
end
350353

351354
function pointwise_loglikelihoods(
352355
model::Model, varinfo::AbstractVarInfo, context::AbstractContext=LikelihoodContext()
353-
) where {T}
356+
)
354357
if !(leafcontext(context) isa LikelihoodContext)
355358
throw(ArgumentError("Leaf context should be a LikelihoodContext"))
356359
end
357360

358-
return pointwise_logdensities(model, chain, context)
361+
return pointwise_logdensities(model, varinfo, context)
359362
end
360363

361364
"""
@@ -369,21 +372,21 @@ including the prior terms.
369372
See also: [`pointwise_logdensities`](@ref).
370373
"""
371374
function pointwise_prior_logdensities(
372-
model::Model, chain, context::AbstractContext=PriorContext()
375+
model::Model, chain, context::AbstractContext=PriorContext(), keytype::Type{T}=String
373376
) where {T}
374377
if !(leafcontext(context) isa PriorContext)
375378
throw(ArgumentError("Leaf context should be a PriorContext"))
376379
end
377380

378-
return pointwise_logdensities(model, chain, context)
381+
return pointwise_logdensities(model, chain, context, keytype)
379382
end
380383

381384
function pointwise_prior_logdensities(
382385
model::Model, varinfo::AbstractVarInfo, context::AbstractContext=PriorContext()
383-
) where {T}
386+
)
384387
if !(leafcontext(context) isa PriorContext)
385388
throw(ArgumentError("Leaf context should be a PriorContext"))
386389
end
387390

388-
return pointwise_logdensities(model, chain, context)
391+
return pointwise_logdensities(model, varinfo, context)
389392
end

0 commit comments

Comments
 (0)