lectures
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -1,19 +1,19 @@
|
||||
Traceback (most recent call last):
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution
|
||||
executenb(
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 1082, in execute
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/site-packages/jupyter_cache/executors/utils.py", line 56, in single_nb_execution
|
||||
record_timing=False,
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/site-packages/nbclient/client.py", line 1082, in execute
|
||||
return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/nbclient/util.py", line 74, in wrapped
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/site-packages/nbclient/util.py", line 74, in wrapped
|
||||
return just_run(coro(*args, **kwargs))
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/nbclient/util.py", line 53, in just_run
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/site-packages/nbclient/util.py", line 53, in just_run
|
||||
return loop.run_until_complete(coro)
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
|
||||
return future.result()
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 535, in async_execute
|
||||
await self.async_execute_cell(
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 827, in async_execute_cell
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/site-packages/nbclient/client.py", line 536, in async_execute
|
||||
cell, index, execution_count=self.code_cells_executed + 1
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/site-packages/nbclient/client.py", line 827, in async_execute_cell
|
||||
self._check_raise_for_error(cell, exec_reply)
|
||||
File "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 735, in _check_raise_for_error
|
||||
File "/Users/MortenImac/anaconda3/lib/python3.6/site-packages/nbclient/client.py", line 735, in _check_raise_for_error
|
||||
raise CellExecutionError.from_cell_and_msg(cell, exec_reply['content'])
|
||||
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
|
||||
------------------
|
||||
@@ -69,47 +69,47 @@ plt.show()
|
||||
[0m[1;32m 32[0m [0;34m[0m[0m
|
||||
[1;32m 33[0m [0;31m# add a 'best fit' line[0m[0;34m[0m[0;34m[0m[0;34m[0m[0m
|
||||
|
||||
[0;32m~/opt/anaconda3/lib/python3.8/site-packages/matplotlib/pyplot.py[0m in [0;36mhist[0;34m(x, bins, range, density, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, data, **kwargs)[0m
|
||||
[1;32m 2603[0m [0morientation[0m[0;34m=[0m[0;34m'vertical'[0m[0;34m,[0m [0mrwidth[0m[0;34m=[0m[0;32mNone[0m[0;34m,[0m [0mlog[0m[0;34m=[0m[0;32mFalse[0m[0;34m,[0m [0mcolor[0m[0;34m=[0m[0;32mNone[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 2604[0m label=None, stacked=False, *, data=None, **kwargs):
|
||||
[0;32m-> 2605[0;31m return gca().hist(
|
||||
[0m[1;32m 2606[0m [0mx[0m[0;34m,[0m [0mbins[0m[0;34m=[0m[0mbins[0m[0;34m,[0m [0mrange[0m[0;34m=[0m[0mrange[0m[0;34m,[0m [0mdensity[0m[0;34m=[0m[0mdensity[0m[0;34m,[0m [0mweights[0m[0;34m=[0m[0mweights[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 2607[0m [0mcumulative[0m[0;34m=[0m[0mcumulative[0m[0;34m,[0m [0mbottom[0m[0;34m=[0m[0mbottom[0m[0;34m,[0m [0mhisttype[0m[0;34m=[0m[0mhisttype[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m~/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py[0m in [0;36mhist[0;34m(x, bins, range, density, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, data, **kwargs)[0m
|
||||
[1;32m 2608[0m [0malign[0m[0;34m=[0m[0malign[0m[0;34m,[0m [0morientation[0m[0;34m=[0m[0morientation[0m[0;34m,[0m [0mrwidth[0m[0;34m=[0m[0mrwidth[0m[0;34m,[0m [0mlog[0m[0;34m=[0m[0mlog[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 2609[0m color=color, label=label, stacked=stacked, **({"data": data}
|
||||
[0;32m-> 2610[0;31m if data is not None else {}), **kwargs)
|
||||
[0m[1;32m 2611[0m [0;34m[0m[0m
|
||||
[1;32m 2612[0m [0;34m[0m[0m
|
||||
|
||||
[0;32m~/opt/anaconda3/lib/python3.8/site-packages/matplotlib/__init__.py[0m in [0;36minner[0;34m(ax, data, *args, **kwargs)[0m
|
||||
[0;32m~/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py[0m in [0;36minner[0;34m(ax, data, *args, **kwargs)[0m
|
||||
[1;32m 1563[0m [0;32mdef[0m [0minner[0m[0;34m([0m[0max[0m[0;34m,[0m [0;34m*[0m[0margs[0m[0;34m,[0m [0mdata[0m[0;34m=[0m[0;32mNone[0m[0;34m,[0m [0;34m**[0m[0mkwargs[0m[0;34m)[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 1564[0m [0;32mif[0m [0mdata[0m [0;32mis[0m [0;32mNone[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m-> 1565[0;31m [0;32mreturn[0m [0mfunc[0m[0;34m([0m[0max[0m[0;34m,[0m [0;34m*[0m[0mmap[0m[0;34m([0m[0msanitize_sequence[0m[0;34m,[0m [0margs[0m[0;34m)[0m[0;34m,[0m [0;34m**[0m[0mkwargs[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0m[1;32m 1566[0m [0;34m[0m[0m
|
||||
[1;32m 1567[0m [0mbound[0m [0;34m=[0m [0mnew_sig[0m[0;34m.[0m[0mbind[0m[0;34m([0m[0max[0m[0;34m,[0m [0;34m*[0m[0margs[0m[0;34m,[0m [0;34m**[0m[0mkwargs[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
|
||||
[0;32m~/opt/anaconda3/lib/python3.8/site-packages/matplotlib/axes/_axes.py[0m in [0;36mhist[0;34m(self, x, bins, range, density, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, **kwargs)[0m
|
||||
[1;32m 6817[0m [0;32mif[0m [0mpatch[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 6818[0m [0mp[0m [0;34m=[0m [0mpatch[0m[0;34m[[0m[0;36m0[0m[0;34m][0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m-> 6819[0;31m [0mp[0m[0;34m.[0m[0mupdate[0m[0;34m([0m[0mkwargs[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0m[1;32m 6820[0m [0;32mif[0m [0mlbl[0m [0;32mis[0m [0;32mnot[0m [0;32mNone[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 6821[0m [0mp[0m[0;34m.[0m[0mset_label[0m[0;34m([0m[0mlbl[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m~/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py[0m in [0;36mhist[0;34m(self, x, bins, range, density, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, **kwargs)[0m
|
||||
[1;32m 6806[0m [0;32mif[0m [0mpatch[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 6807[0m [0mp[0m [0;34m=[0m [0mpatch[0m[0;34m[[0m[0;36m0[0m[0;34m][0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m-> 6808[0;31m [0mp[0m[0;34m.[0m[0mupdate[0m[0;34m([0m[0mkwargs[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0m[1;32m 6809[0m [0;32mif[0m [0mlbl[0m [0;32mis[0m [0;32mnot[0m [0;32mNone[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 6810[0m [0mp[0m[0;34m.[0m[0mset_label[0m[0;34m([0m[0mlbl[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
|
||||
[0;32m~/opt/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py[0m in [0;36mupdate[0;34m(self, props)[0m
|
||||
[0;32m~/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py[0m in [0;36mupdate[0;34m(self, props)[0m
|
||||
[1;32m 1004[0m [0;34m[0m[0m
|
||||
[1;32m 1005[0m [0;32mwith[0m [0mcbook[0m[0;34m.[0m[0m_setattr_cm[0m[0;34m([0m[0mself[0m[0;34m,[0m [0meventson[0m[0;34m=[0m[0;32mFalse[0m[0;34m)[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m-> 1006[0;31m [0mret[0m [0;34m=[0m [0;34m[[0m[0m_update_property[0m[0;34m([0m[0mself[0m[0;34m,[0m [0mk[0m[0;34m,[0m [0mv[0m[0;34m)[0m [0;32mfor[0m [0mk[0m[0;34m,[0m [0mv[0m [0;32min[0m [0mprops[0m[0;34m.[0m[0mitems[0m[0;34m([0m[0;34m)[0m[0;34m][0m[0;34m[0m[0;34m[0m[0m
|
||||
[0m[1;32m 1007[0m [0;34m[0m[0m
|
||||
[1;32m 1008[0m [0;32mif[0m [0mlen[0m[0;34m([0m[0mret[0m[0;34m)[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
|
||||
[0;32m~/opt/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py[0m in [0;36m<listcomp>[0;34m(.0)[0m
|
||||
[0;32m~/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py[0m in [0;36m<listcomp>[0;34m(.0)[0m
|
||||
[1;32m 1004[0m [0;34m[0m[0m
|
||||
[1;32m 1005[0m [0;32mwith[0m [0mcbook[0m[0;34m.[0m[0m_setattr_cm[0m[0;34m([0m[0mself[0m[0;34m,[0m [0meventson[0m[0;34m=[0m[0;32mFalse[0m[0;34m)[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m-> 1006[0;31m [0mret[0m [0;34m=[0m [0;34m[[0m[0m_update_property[0m[0;34m([0m[0mself[0m[0;34m,[0m [0mk[0m[0;34m,[0m [0mv[0m[0;34m)[0m [0;32mfor[0m [0mk[0m[0;34m,[0m [0mv[0m [0;32min[0m [0mprops[0m[0;34m.[0m[0mitems[0m[0;34m([0m[0;34m)[0m[0;34m][0m[0;34m[0m[0;34m[0m[0m
|
||||
[0m[1;32m 1007[0m [0;34m[0m[0m
|
||||
[1;32m 1008[0m [0;32mif[0m [0mlen[0m[0;34m([0m[0mret[0m[0;34m)[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
|
||||
[0;32m~/opt/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py[0m in [0;36m_update_property[0;34m(self, k, v)[0m
|
||||
[1;32m 999[0m [0mfunc[0m [0;34m=[0m [0mgetattr[0m[0;34m([0m[0mself[0m[0;34m,[0m [0;34m'set_'[0m [0;34m+[0m [0mk[0m[0;34m,[0m [0;32mNone[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m~/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py[0m in [0;36m_update_property[0;34m(self, k, v)[0m
|
||||
[1;32m 1000[0m [0;32mif[0m [0;32mnot[0m [0mcallable[0m[0;34m([0m[0mfunc[0m[0;34m)[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m
|
||||
[0;32m-> 1001[0;31m raise AttributeError('{!r} object has no property {!r}'
|
||||
[0m[1;32m 1002[0m .format(type(self).__name__, k))
|
||||
[1;32m 1003[0m [0;32mreturn[0m [0mfunc[0m[0;34m([0m[0mv[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 1001[0m raise AttributeError('{!r} object has no property {!r}'
|
||||
[0;32m-> 1002[0;31m .format(type(self).__name__, k))
|
||||
[0m[1;32m 1003[0m [0;32mreturn[0m [0mfunc[0m[0;34m([0m[0mv[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
|
||||
[1;32m 1004[0m [0;34m[0m[0m
|
||||
|
||||
[0;31mAttributeError[0m: 'Rectangle' object has no property 'normed'
|
||||
AttributeError: 'Rectangle' object has no property 'normed'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
- file: intro.md
|
||||
- file: introduction.ipynb
|
||||
numbered: true
|
||||
- part: Getting started #includes also linear algebra
|
||||
chapters:
|
||||
- file: gettingstarted.ipynb
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Content with notebooks\n",
|
||||
"\n",
|
||||
"You can also create content with Jupyter Notebooks. This means that you can include\n",
|
||||
"code blocks and their outputs in your book.\n",
|
||||
"\n",
|
||||
"## Markdown + notebooks\n",
|
||||
"\n",
|
||||
"As it is markdown, you can embed images, HTML, etc into your posts!\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"You an also $add_{math}$ and\n",
|
||||
"\n",
|
||||
"$$\n",
|
||||
"math^{blocks}\n",
|
||||
"$$\n",
|
||||
"\n",
|
||||
"or\n",
|
||||
"\n",
|
||||
"$$\n",
|
||||
"\\begin{aligned}\n",
|
||||
"\\mbox{mean} la_{tex} \\\\ \\\\\n",
|
||||
"math blocks\n",
|
||||
"\\end{aligned}\n",
|
||||
"$$\n",
|
||||
"\n",
|
||||
"But make sure you \\$Escape \\$your \\$dollar signs \\$you want to keep!\n",
|
||||
"\n",
|
||||
"## MyST markdown\n",
|
||||
"\n",
|
||||
"MyST markdown works in Jupyter Notebooks as well. For more information about MyST markdown, check\n",
|
||||
"out [the MyST guide in Jupyter Book](https://jupyterbook.org/content/myst.html),\n",
|
||||
"or see [the MyST markdown documentation](https://myst-parser.readthedocs.io/en/latest/).\n",
|
||||
"\n",
|
||||
"## Code blocks and outputs\n",
|
||||
"\n",
|
||||
"Jupyter Book will also embed your code blocks and output in your book.\n",
|
||||
"For example, here's some sample Matplotlib code:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from matplotlib import rcParams, cycler\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"import numpy as np\n",
|
||||
"plt.ion()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Fixing random state for reproducibility\n",
|
||||
"np.random.seed(19680801)\n",
|
||||
"\n",
|
||||
"N = 10\n",
|
||||
"data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)]\n",
|
||||
"data = np.array(data).T\n",
|
||||
"cmap = plt.cm.coolwarm\n",
|
||||
"rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N)))\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"from matplotlib.lines import Line2D\n",
|
||||
"custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4),\n",
|
||||
" Line2D([0], [0], color=cmap(.5), lw=4),\n",
|
||||
" Line2D([0], [0], color=cmap(1.), lw=4)]\n",
|
||||
"\n",
|
||||
"fig, ax = plt.subplots(figsize=(10, 5))\n",
|
||||
"lines = ax.plot(data)\n",
|
||||
"ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"There is a lot more that you can do with outputs (such as including interactive outputs)\n",
|
||||
"with your book. For more information about this, see [the Jupyter Book documentation](https://jupyterbook.org)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.0"
|
||||
},
|
||||
"widgets": {
|
||||
"application/vnd.jupyter.widget-state+json": {
|
||||
"state": {},
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||