_validate_max_iter
Signature
_validate_max_iter(max_iter: int) -> int
What problem it solves
Prevents the fit iteration from starting with an invalid maximum iteration count.
Input contract
max_itermust be a real integer, not a boolean.The integer value must be strictly positive.
Where it is used
in
lin_fitbefore the optional iterative loop onsigma_x
Failure modes
ValueErrorifmax_iteris not an integerValueErrorifmax_iteris a booleanValueErrorifmax_iter <= 0
Why it stays private
It expresses a validation rule that is very specific to the iterative linear-fit algorithm.