question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENH: change term zero to root in newton

See original GitHub issue

Is 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:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
WarrenWeckessercommented, Nov 25, 2022

I think it would be best to focus on the consistent use of root in the root-finding functions in optimize. In other contexts, the use of zero 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:

1reaction
mdhabercommented, Nov 25, 2022

I’d prefer to review optimize only. No rush.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Newton's Method for Finding Roots of Functions
Newton's Method is an algorithm used to create increasingly accurate approximations of roots of a function. Essentially, the steps are as ...
Read more >
Newton's method - Wikipedia
Square root​​ Newton's method is one of many methods of computing square roots. We can rephrase that as finding the zero of f(x)...
Read more >
14.7.6: Newton's Method - Engineering LibreTexts
Newton's method approximates roots of f(x)=0 by starting with an initial approximation x0, then uses tangent lines to the graph of f to...
Read more >
ENH: "vectorize" newton and other scalar methods · Issue #8354
If user wants to find zeros of multiple scalar problems simultaneously, they have to use np.vectorize , a multidimensional solver, ...
Read more >
Newton-Raphson Mehtod of solving nonlinear equations
These methods are always convergent since they are based on reducing the interval between the two guesses so as to zero in on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found