Skip to content

Commit

Permalink
Update docs/src/tutorials/prob-interface.md
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
sunxd3 and devmotion authored Feb 29, 2024
1 parent ef668a3 commit c901f82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/tutorials/prob-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ function cross_val(
loss = zero(logjoint(model, rand(rng, model)))
# prepare the K-folds
fold_size = div(length(dataset), nfolds)
if length(dataset) % nfolds != 0
fold_size, remaining = divrem(length(dataset), nfolds)
if remaining != 0
error("The number of folds must divide the number of data points.")
end
splits = Vector{Tuple{SubArray,SubArray}}(undef, nfolds)
Expand Down

0 comments on commit c901f82

Please sign in to comment.