mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-01-12 14:18:23 +00:00
[NumCS] Fix error
This commit is contained in:
Binary file not shown.
@@ -22,7 +22,7 @@ def newton(x, F, DF, tol=1e-12, maxit=50):
|
|||||||
for _ in range(maxit):
|
for _ in range(maxit):
|
||||||
s = np.linal.solve(DF(x), F(x))
|
s = np.linal.solve(DF(x), F(x))
|
||||||
x -= s
|
x -= s
|
||||||
if np.linalgnorm(s) < tol * np.linalg.norm(x):
|
if np.linalg.norm(s) < tol * np.linalg.norm(x):
|
||||||
return x
|
return x
|
||||||
\end{code}
|
\end{code}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user