Skip to content

Commit 439e470

Browse files
authored
Fix signature of isdone in docstring (#91)
* Fix signature of `isdone` in docstring * Update sample.jl
1 parent 56431bd commit 439e470

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sample.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ convergence criterion `isdone` returns `true`, and return the samples.
4444
4545
The function `isdone` has the signature
4646
```julia
47-
isdone(rng, model, sampler, samples, iteration; kwargs...)
47+
isdone(rng, model, sampler, samples, state, iteration; kwargs...)
4848
```
49-
and should return `true` when sampling should end, and `false` otherwise.
49+
where `state` and `iteration` are the current state and iteration of the sampler, respectively.
50+
It should return `true` when sampling should end, and `false` otherwise.
5051
"""
5152
function StatsBase.sample(
5253
rng::Random.AbstractRNG,

0 commit comments

Comments
 (0)