Skip to content

Commit

Permalink
[L2-1] Minor changes
Browse files Browse the repository at this point in the history
* Change sentence about `rcParams` dictionary to set style of figures.
* Add code comment about array slicing.
  • Loading branch information
mesnardo committed Aug 22, 2018
1 parent 605fb5d commit bf8ad17
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lessons/02_spacetime/02_01_1DConvection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Alright. Let's get a little Python on the road. First: we need to load our array and plotting libraries, as usual. And if you noticed in the [*Bonus!* notebook for Module 1](https://nbviewer.jupyter.org/github/numerical-mooc/numerical-mooc/blob/master/lessons/01_phugoid/01_04_Second_Order_Methods.ipynb), we taught you a neat trick to set some global plotting parameters with the `rcParams` module. We like to do that."
"Alright. Let's get a little Python on the road. First: we need to load our array and plotting libraries, as usual."
]
},
{
Expand All @@ -245,6 +245,13 @@
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We also set notebook-wide plotting parameters for the font family and the font size by modifying entries of the `rcParams` dictionary."
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand Down Expand Up @@ -666,6 +673,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Compute the solution using Euler's method and array slicing.\n",
"u = u0.copy()\n",
"for n in range(1, nt):\n",
" u[1:] = u[1:] - dt / dx * u[1:] * (u[1:] - u[:-1])"
Expand Down

0 comments on commit bf8ad17

Please sign in to comment.