Skip to content

Commit 9445f8d

Browse files
committed
misc
1 parent 7cad40b commit 9445f8d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lectures/newtons_method.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,9 @@ def newton(f, x_0, tol=1e-5, max_iter=15):
207207
if(n > max_iter):
208208
raise Exception('Max iteration reached without convergence')
209209
y = q(x)
210-
if jnp.any(jnp.isnan(y)):
211-
raise Exception('Solution not found with NaN generated')
212210
error = jnp.linalg.norm(x - y)
213211
x = y
214212
print(f'iteration {n}, error = {error}')
215-
print('\n' + f'Result = {x} \n')
216213
return x
217214
```
218215

0 commit comments

Comments
 (0)