From 15e4354d10f69d893600236eb20c89e924d525a0 Mon Sep 17 00:00:00 2001 From: Vaibhav Kumar Dixit Date: Mon, 28 Oct 2024 17:10:57 -0400 Subject: [PATCH] Update `_check_and_convert_maxiters` to ensure rounding --- src/utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.jl b/src/utils.jl index c104330c2..576206dbf 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -40,7 +40,7 @@ function _check_and_convert_maxiters(maxiters) if !(isnothing(maxiters)) && maxiters <= 0.0 error("The number of maxiters has to be a non-negative and non-zero number.") elseif !(isnothing(maxiters)) - return convert(Int, maxiters) + return convert(Int, round(maxiters)) end end