We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9142a6 commit 295fdc1Copy full SHA for 295fdc1
src/sample.jl
@@ -265,6 +265,13 @@ function mcmcsample(
265
initial_state=nothing,
266
kwargs...,
267
)
268
+ # Check the number of requested samples.
269
+ N > 0 || error("the number of samples must be ≥ 1")
270
+ discard_initial >= 0 ||
271
+ throw(ArgumentError("number of discarded samples must be non-negative"))
272
+ num_warmup >= 0 ||
273
+ throw(ArgumentError("number of warm-up samples must be non-negative"))
274
+
275
# Determine how many samples to drop from `num_warmup` and the
276
# main sampling process before we start saving samples.
277
discard_from_warmup = min(num_warmup, discard_initial)
0 commit comments