Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions content/downloads/notebooks/PEP8LineLengths.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"It's clear tha many of these duplicates are just boiler-plate code or documentation standards that happen to appear often through the package; we may be able to clean up our histogram by plotting only the histogram of lengths of *unique* lines, by passing the ist through Python's ``set`` collection:"
"It's clear that many of these duplicates are just boiler-plate code or documentation standards that happen to appear often through the package; we may be able to clean up our histogram by plotting only the histogram of lengths of *unique* lines, by passing the ist through Python's ``set`` collection:"
]
},
{
Expand All @@ -329,7 +329,7 @@
],
"source": [
"lengths = [len(line) for line in set(iter_lines(numpy))]\n",
"plt.hist(lengths, bins=np.arange(125), histtype='step', linewidth=1);"
"plt.hist(lengths, bins=np.arange(125), histtype='step', linewidth=1)"
]
},
{
Expand Down Expand Up @@ -563,7 +563,7 @@
" return amplitude * stats.lognorm.pdf(x, scale=np.exp(mu), s=sigma)\n",
"\n",
"x = np.linspace(0, 100, 1000)\n",
"plt.plot(x, lognorm_model(x, 1000, 3.5, 0.7));"
"plt.plot(x, lognorm_model(x, 1000, 3.5, 0.7))"
]
},
{
Expand Down Expand Up @@ -610,7 +610,7 @@
" method='Nelder-Mead')\n",
"print(\"optimal parameters:\", opt.x)\n",
"\n",
"plt.fill_between(lengths, lognorm_model(lengths, *opt.x), alpha=0.3, color='gray');"
"plt.fill_between(lengths, lognorm_model(lengths, *opt.x), alpha=0.3, color='gray')"
]
},
{
Expand Down Expand Up @@ -748,8 +748,8 @@
" plt.text(mode, std, ' ' + name + ' ', size=14,\n",
" ha=ha.get(name, 'left'), va=va.get(name, 'bottom'))\n",
"plt.xlabel('mode of model', size=14)\n",
"plt.ylabel('std. deviation of model', size=14);\n",
"plt.xlim(30, 41);"
"plt.ylabel('std. deviation of model', size=14)\n",
"plt.xlim(30, 41)"
]
},
{
Expand Down