From 4f373012b5b5d6b07ca2df1021b61f05f6c7bb16 Mon Sep 17 00:00:00 2001 From: guij15 <43374716+guij15@users.noreply.github.com> Date: Sun, 9 Jun 2019 10:04:21 +0800 Subject: [PATCH] Update newton_raphson.py --- maths/newton_raphson.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maths/newton_raphson.py b/maths/newton_raphson.py index c08bcedc9a4d..cc6c92734fd4 100644 --- a/maths/newton_raphson.py +++ b/maths/newton_raphson.py @@ -33,7 +33,7 @@ def newton_raphson(f, x0=0, maxiter=100, step=0.0001, maxerror=1e-6,logsteps=Fal if error < maxerror: break else: - raise ValueError("Itheration limit reached, no converging solution found") + raise ValueError("Iteration limit reached, no converging solution found") if logsteps: #If logstep is true, then log intermediate steps return a, error, steps @@ -47,4 +47,4 @@ def newton_raphson(f, x0=0, maxiter=100, step=0.0001, maxerror=1e-6,logsteps=Fal plt.xlabel("step") plt.ylabel("error") plt.show() - print("solution = {%f}, error = {%f}" % (solution, error)) \ No newline at end of file + print("solution = {%f}, error = {%f}" % (solution, error))