Skip to content

Commit 7fcc2ed

Browse files
committed
remove all index derivatives
1 parent da39201 commit 7fcc2ed

19 files changed

+21
-325
lines changed

lectures/about_py.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ kernelspec:
99
name: python3
1010
---
1111

12-
```{index} single: python
13-
```
1412

1513
# About These Lectures
1614

@@ -86,7 +84,7 @@ This is important because it
8684

8785
### Common Uses
8886

89-
{index}`Python <single: Python; common uses>` is a general-purpose language used in almost all application domains, including
87+
Python is a general-purpose language used in almost all application domains, including
9088

9189
* AI
9290
* scientific computing
@@ -155,8 +153,6 @@ Other features of Python:
155153

156154
### Syntax and Design
157155

158-
```{index} single: Python; syntax and design
159-
```
160156

161157
One reason for Python's popularity is its simple and elegant design --- we'll see many examples later on.
162158

@@ -274,8 +270,6 @@ These lectures will explain how.
274270

275271
## Scientific Programming with Python
276272

277-
```{index} single: scientific programming
278-
```
279273

280274
We have already discussed the importance of Python for AI, machine learning and data science
281275

@@ -299,9 +293,6 @@ This section briefly showcases some examples of Python for general scientific pr
299293

300294
### NumPy
301295

302-
```{index} single: scientific programming; numeric
303-
```
304-
305296
One of the most important parts of scientific computing is working with data.
306297

307298
Data is often stored in matrices, vectors and arrays.
@@ -402,8 +393,6 @@ Later we'll discuss SciPy in more detail.
402393

403394
### Graphics
404395

405-
```{index} single: Matplotlib
406-
```
407396

408397
A major strength of Python is data visualization.
409398

@@ -458,8 +447,6 @@ For example, we are interesting in studying
458447

459448
Python has many libraries for studying networks and graphs.
460449

461-
```{index} single: NetworkX
462-
```
463450

464451
One well-known example is [NetworkX](http://networkx.github.io/).
465452

lectures/debugging.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ kernelspec:
1111

1212
# Debugging and Handling Errors
1313

14-
```{index} single: Debugging
15-
```
16-
1714
```{epigraph}
1815
"Debugging is twice as hard as writing the code in the first place.
1916
Therefore, if you write the code as cleverly as possible, you are, by definition,
@@ -36,9 +33,6 @@ In this lecture, we will discuss how to debug our programs and improve error han
3633

3734
## Debugging
3835

39-
```{index} single: Debugging
40-
```
41-
4236
Debugging tools for Python vary across platforms, IDEs and editors.
4337

4438
For example, a [visual debugger](https://jupyterlab.readthedocs.io/en/stable/user/debugger.html) is available in JupyterLab.
@@ -246,8 +240,6 @@ The full list of magics is [here](http://ipython.readthedocs.org/en/stable/inter
246240

247241
## Handling Errors
248242

249-
```{index} single: Python; Handling Errors
250-
```
251243

252244
Sometimes it's possible to anticipate bugs and errors as we're writing code.
253245

@@ -283,8 +275,6 @@ We have seen `AttributeError` and `NameError` in [our previous examples](#debug_
283275

284276
In Python, there are two types of errors -- syntax errors and exceptions.
285277

286-
```{index} single: Python; Exceptions
287-
```
288278

289279
Here's an example of a common error type
290280

@@ -337,8 +327,6 @@ In Python, these errors are called *exceptions*.
337327

338328
### Assertions
339329

340-
```{index} single: Python; Assertions
341-
```
342330

343331
Sometimes errors can be avoided by checking whether your program runs as expected.
344332

@@ -370,8 +358,6 @@ The advantage is that we can
370358

371359
### Handling Errors During Runtime
372360

373-
```{index} single: Python; Runtime Errors
374-
```
375361

376362
The approach used above is a bit limited, because it always leads to
377363
termination.

lectures/functions.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ kernelspec:
1111

1212
# Functions
1313

14-
```{index} single: Python; User-defined functions
15-
```
1614

1715
## Overview
1816

@@ -158,8 +156,6 @@ Functions without a return statement automatically return the special Python obj
158156
(pos_args)=
159157
### Keyword Arguments
160158

161-
```{index} single: Python; keyword arguments
162-
```
163159

164160
In a [previous lecture](python_by_example.md), you came across the statement
165161

@@ -217,8 +213,6 @@ a function in the following sections.
217213

218214
### One-Line Functions: `lambda`
219215

220-
```{index} single: Python; lambda functions
221-
```
222216

223217
The `lambda` keyword is used to create simple functions on one line.
224218

@@ -312,8 +306,6 @@ The net result is that the name `data` is *bound* to the list `ϵ_values` return
312306

313307
### Adding Conditions
314308

315-
```{index} single: Python; Conditions
316-
```
317309

318310
Our function `generate_data()` is rather limited.
319311

@@ -398,8 +390,6 @@ function*---as we did above.
398390
(recursive_functions)=
399391
## Recursive Function Calls (Advanced)
400392

401-
```{index} single: Python; Recursion
402-
```
403393

404394
This is an advanced topic that you should feel free to skip.
405395

lectures/getting_started.md

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,8 @@ kernelspec:
99
name: python3
1010
---
1111

12-
<!-- TODO: Review this styling -->
13-
14-
<style>
15-
.auto {
16-
width: 70%;
17-
height: auto;
18-
}
19-
.terminal{
20-
width: 80%;
21-
height: auto;
22-
}
23-
</style>
24-
25-
2612
# Getting Started
2713

28-
```{index} single: Python
29-
```
3014

3115
## Overview
3216

@@ -95,8 +79,6 @@ Anaconda also comes with a package management system to organize your code libra
9579
(install_anaconda)=
9680
### Installing Anaconda
9781

98-
```{index} single: Python; Anaconda
99-
```
10082

10183
To install Anaconda, [download](https://www.anaconda.com/download/) the binary and follow the instructions.
10284

@@ -119,16 +101,7 @@ As a practice run, please execute the following
119101
For more information on conda, type conda help in a terminal.
120102

121103
(ipython_notebook)=
122-
## {index}`Jupyter Notebooks <single: Jupyter Notebooks>`
123-
124-
```{index} single: Python; IPython
125-
```
126-
127-
```{index} single: IPython
128-
```
129-
130-
```{index} single: Jupyter
131-
```
104+
## Jupyter Notebook
132105

133106
[Jupyter](http://jupyter.org/) notebooks are one of the many possible ways to interact with Python and the scientific libraries.
134107

@@ -157,8 +130,6 @@ These lectures are designed for executing in Jupyter notebooks.
157130

158131
### Starting the Jupyter Notebook
159132

160-
```{index} single: Jupyter Notebook; Setup
161-
```
162133

163134
Once you have installed Anaconda, you can start the Jupyter notebook.
164135

@@ -203,8 +174,6 @@ The notebook displays an *active cell*, into which you can type Python commands.
203174

204175
### Notebook Basics
205176

206-
```{index} single: Jupyter Notebook; Basics
207-
```
208177

209178
Let's start with how to edit code and run simple programs.
210179

@@ -319,8 +288,6 @@ In this way, the Tab key helps remind you of what's available and also saves you
319288
(gs_help)=
320289
#### On-Line Help
321290

322-
```{index} single: Jupyter Notebook; Help
323-
```
324291

325292
To get help on `np.random.randn`, we can execute `np.random.randn?`.
326293

@@ -357,8 +324,6 @@ Now we `Shift+Enter` to produce this
357324

358325
### Debugging Code
359326

360-
```{index} single: Jupyter Notebook; Debugging
361-
```
362327

363328
Debugging is the process of identifying and removing errors from a program.
364329

@@ -393,11 +358,6 @@ You can explore more functionality of the debugger in the [Jupyter documentation
393358

394359
### Sharing Notebooks
395360

396-
```{index} single: Jupyter Notebook; Sharing
397-
```
398-
399-
```{index} single: Jupyter Notebook; nbviewer
400-
```
401361

402362
Notebook files are just text files structured in [JSON](https://en.wikipedia.org/wiki/JSON) and typically ending with `.ipynb`.
403363

@@ -430,10 +390,6 @@ to comments and votes by the community.
430390

431391
## Installing Libraries
432392

433-
(gs_qe)=
434-
```{index} single: QuantEcon
435-
```
436-
437393
Most of the libraries we need come in Anaconda.
438394

439395
Other libraries can be installed with `pip` or `conda`.
@@ -511,10 +467,8 @@ following questions:
511467
1. how should you execute it?
512468
1. How should you modify or edit it?
513469

514-
#### Option 1: {index}`JupyterLab <single: JupyterLab>`
470+
#### Option 1: JupyterLab
515471

516-
```{index} single: JupyterLab
517-
```
518472

519473
[JupyterLab](https://github.com/jupyterlab/jupyterlab) is an integrated development environment built on top of Jupyter notebooks.
520474

lectures/matplotlib.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ kernelspec:
99
name: python3
1010
---
1111

12-
# {index}`Matplotlib <single: Matplotlib>`
12+
# Matplotlib
1313

14-
```{index} single: Python; Matplotlib
15-
```
1614

1715
## Overview
1816

@@ -40,8 +38,6 @@ But first, let's discuss the difference.
4038

4139
## The APIs
4240

43-
```{index} single: Matplotlib; Simple API
44-
```
4541

4642
### The MATLAB-style API
4743

@@ -138,8 +134,6 @@ We mention just a few.
138134

139135
### Multiple Plots on One Axis
140136

141-
```{index} single: Matplotlib; Multiple Plots on One Axis
142-
```
143137

144138
It's straightforward to generate multiple plots on the same axes.
145139

@@ -162,9 +156,6 @@ plt.show()
162156

163157
### Multiple Subplots
164158

165-
```{index} single: Matplotlib; Subplots
166-
```
167-
168159
Sometimes we want multiple subplots in one figure.
169160

170161
Here's an example that generates 6 histograms
@@ -184,8 +175,6 @@ plt.show()
184175

185176
### 3D Plots
186177

187-
```{index} single: Matplotlib; 3D Plots
188-
```
189178

190179
Matplotlib does a nice job of 3D plots --- here is one example
191180

0 commit comments

Comments
 (0)