Skip to content

Commit

Permalink
Docstring to numpydoc standard again.
Browse files Browse the repository at this point in the history
  • Loading branch information
IanHawke committed Aug 28, 2014
1 parent 08d38bc commit 8bab790
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions lessons/01_phugoid/01_03_stability.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,15 @@
"def f(u):\n",
" \"\"\"Returns the right hand-side of the system of equations.\n",
" \n",
" Arguments\n",
" Parameters\n",
" ---------\n",
" u -- solution at time-step n.\n",
" u : list of float\n",
" solution at time-step n.\n",
" \n",
" Returns\n",
" -------\n",
" rhs: list of float\n",
" right hand side defining the system.\n",
" \"\"\"\n",
" return numpy.array([u[1], -u[0]])"
],
Expand All @@ -239,11 +245,19 @@
"def euler_step(u, f, dt):\n",
" \"\"\"Returns solution at time-step n+1 using Euler's method.\n",
" \n",
" Arguments\n",
" Parameters\n",
" ---------\n",
" u -- solution at time-step n.\n",
" f -- function to compute right hand-side.\n",
" dt -- time-increment.\n",
" u : array of float\n",
" solution at time-step n.\n",
" f : function\n",
" function to compute right hand-side.\n",
" dt : float\n",
" time-increment.\n",
" \n",
" Returns\n",
" -------\n",
" unew : array of float\n",
" solution u at time-step n+1\n",
" \"\"\"\n",
" return u + dt * f(u)"
],
Expand Down

0 comments on commit 8bab790

Please sign in to comment.