mirror of
https://github.com/ArthurDanjou/ArtStudies.git
synced 2026-01-14 15:54:13 +01:00
Refactor code formatting and improve readability in Jupyter notebooks for TP_4 and TP_5
- Adjusted indentation and line breaks for better clarity in function definitions and import statements. - Standardized string quotes for consistency across the codebase. - Enhanced readability of DataFrame creation and manipulation by breaking long lines into multiple lines. - Cleaned up print statements and comments for improved understanding. - Ensured consistent use of whitespace around operators and after commas.
This commit is contained in:
@@ -159,11 +159,15 @@
|
||||
"\n",
|
||||
" for n in range(N - 1):\n",
|
||||
" p1 = f(vt[n], yn[:, n])\n",
|
||||
"\n",
|
||||
" def F1(p2):\n",
|
||||
" return f(vt[n] + h / 3, yn[:, n] + h / 6 * (p1 + p2)) - p2\n",
|
||||
"\n",
|
||||
" p2 = newton(F1, yn[:, n], fprime=None, tol=tol, maxiter=itmax)\n",
|
||||
"\n",
|
||||
" def F2(yn1):\n",
|
||||
" return yn[:, n] + h / 4 * (3 * p2 + f(vt[n + 1], yn1)) - yn1\n",
|
||||
"\n",
|
||||
" yn[:, n + 1] = newton(F2, yn[:, n], fprime=None, tol=tol, maxiter=itmax)\n",
|
||||
" return yn"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user