Commit c7a7ca83 by Trevor Bekolay

### Ensure code cells have correct class

`And a bunch of whitespace fixes.`
parent d1d876d3
 ... ... @@ -531,7 +531,7 @@ inflammation rises and falls over a 40-day period. > ~~~ {.python} > % matplotlib inline > ~~~ > > > The `%` indicates an IPython magic function - > a function that is only valid within the notebook environment. > Note that you only have to execute this function once per notebook. ... ...
 ... ... @@ -214,7 +214,9 @@ so we should always use it when we can. > Exponentiation is built into Python: > > ~~~ {.python} > print(5**3) > print(5 ** 3) > ~~~ > ~~~ {.output} > 125 > ~~~ > ... ...
 ... ... @@ -134,7 +134,7 @@ print('odds after reversing:', odds) odds after reversing: [11, 7, 5, 3] ~~~ While modifying in place, it is useful to remember that python treats lists in a slightly counterintuitive way. While modifying in place, it is useful to remember that Python treats lists in a slightly counterintuitive way. If we make a list and (attempt to) copy it then modify in place, we can cause all sorts of trouble: ... ... @@ -150,8 +150,8 @@ primes: [1, 3, 5, 7, 2] odds: [1, 3, 5, 7, 2] ~~~ This is because python stores a list in memory, and then can use multiple names to refer to the same list. If all we want to do is copy a (simple) list, we can use the list() command, so we do not modify a list we did not mean to: This is because Python stores a list in memory, and then can use multiple names to refer to the same list. If all we want to do is copy a (simple) list, we can use the `list` function, so we do not modify a list we did not mean to: ~~~ {.python} odds = [1, 3, 5, 7] ... ...
 ... ... @@ -346,7 +346,6 @@ Help on function center in module __main__: center(data, desired) Return a new array containing the original data centered around the desired value. ~~~ A string like this is called a [docstring](reference.html#docstring). ... ... @@ -368,7 +367,6 @@ Help on function center in module __main__: center(data, desired) Return a new array containing the original data centered around the desired value. Example: center([1, 2, 3], 0) => [-1, 0, 1] ~~~ ## Defining Defaults ... ... @@ -588,13 +586,12 @@ loadtxt(fname, dtype=, comments='#', delimiter=None, converters=N array([ 1., 3.]) >>> y array([ 2., 4.]) ~~~ There's a lot of information here, but the most important part is the first couple of lines: ~~~python ~~~ {.output} loadtxt(fname, dtype=, comments='#', delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False, ndmin=0) ~~~ ... ... @@ -603,7 +600,7 @@ This tells us that `loadtxt` has one parameter called `fname` that doesn't have and eight others that do. If we call the function like this: ~~~python ~~~ {.python} numpy.loadtxt('inflammation-01.csv', ',') ~~~ ... ...