-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for a small newton raphson package #1609
Conversation
b8001d1
to
124f014
Compare
integration_tests/nrp/nr.py
Outdated
while abs(func(x, c)) > err and i < maxiter: | ||
h = func(x, c) / func_prime(x, c) | ||
x = x - h | ||
i += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert tabs to spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, some wierd issue. I have used a tab for indenting and locally looks fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably set some pre-commit hooks to autoformat the code when commiting. we can use python black as the formatter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use LPython as the formatter. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
Beautiful, that's exactly what we need. Thanks! |
ca43803
to
144347e
Compare
This tests only on an already-defined function. We will modify this test to accept callbacks once we complete working on #1608
Related to #992