Bound on absolute tolerance 'xtol' in 'optimize/zeros.py' is too strict or not properly documented #14059
Labels
Documentation
Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org
scipy.optimize
Milestone
A number of root finding functions do not accept
xtol = 0
although the docs clearly state that 'The parameter must be nonnegative.'I had no time to thoroughly inspect the code, but I suspect that imposing
xtol > 0
(instead ofxtol >= 0
) is overzealous and I would classify this issue as a bug.Alternatively if erroring when
xtol == 0
is strictly intended behaviour, the docs should read "The parameter must be positive."In both cases I can provide a PR.
Reproducing code example:
Error message:
Scipy/Numpy/Python version information:
Code reference
Culprit for
method = bisect
scipy/scipy/optimize/zeros.py
Lines 487 to 490 in 4ec4ab8
scipy/scipy/optimize/zeros.py
Lines 545 to 546 in 4ec4ab8
etc.
The text was updated successfully, but these errors were encountered: