ENH: change term zero to root in newton
See original GitHub issueIs your feature request related to a problem? Please describe.
in root finding, we try to find x | f(x) == 0
here, x is sometimes called a root of the function or a zero of the function.
This request is to use the term ‘root’ instead of the term ‘zero’ because it’s technically confusing that both x and y can be seen as a “zero value”
consider the specific case of documenting the tol
argument to the newton
method:
https://github.com/scipy/scipy/blob/v1.9.3/scipy/optimize/_zeros_py.py#L94-L370
tol is labeled as “The allowable error of the zero value.” but it is applied along the x-axis only, not to the “zero value” along the y-axis
Describe the solution you’d like.
it would be much clearer if scipy sticks to the term “root” to identify x within root-finding algorithms
Describe alternatives you’ve considered.
you could also actually apply tol to the output variable. in many cases this speeds things up although i don’t think it’s backwards compatible. it also arguably doesn’t solve the root issue 😉 of confusing parameter naming
Additional context (e.g. screenshots, GIFs)
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
I think it would be best to focus on the consistent use of
root
in the root-finding functions inoptimize
. In other contexts, the use ofzero
has a long history, and I think it would be more confusing to switch to root. For example, with Bessel functions, zeros is widely used:I’d prefer to review optimize only. No rush.