You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See them all [here](http://docs.scipy.org/doc/scipy/reference/index.html).
391
+
See them all [here](https://docs.scipy.org/doc/scipy/reference/index.html).
392
392
393
393
Later we'll discuss SciPy in more detail.
394
394
@@ -400,7 +400,7 @@ Later we'll discuss SciPy in more detail.
400
400
401
401
A major strength of Python is data visualization.
402
402
403
-
The most popular and comprehensive Python library for creating figures and graphs is [Matplotlib](http://matplotlib.org/), with functionality including
403
+
The most popular and comprehensive Python library for creating figures and graphs is [Matplotlib](https://matplotlib.org/), with functionality including
404
404
405
405
* plots, histograms, contour images, 3D graphs, bar charts etc.
406
406
* output in many formats (PDF, PNG, EPS, etc.)
@@ -427,10 +427,10 @@ More examples can be found in the [Matplotlib thumbnail gallery](https://matplot
427
427
428
428
Other graphics libraries include
429
429
430
-
*[Plotly](https://plot.ly/python/)
430
+
*[Plotly](https://plotly.com/python/)
431
431
*[seaborn](https://seaborn.pydata.org/) --- a high-level interface for matplotlib
432
432
*[Altair](https://altair-viz.github.io/)
433
-
*[Bokeh](http://bokeh.pydata.org/en/latest/)
433
+
*[Bokeh](https://bokeh.pydata.org/en/latest/)
434
434
435
435
You can visit the [Python Graph Gallery](https://www.python-graph-gallery.com/) for more example plots drawn using a variety of libraries.
436
436
@@ -452,7 +452,7 @@ Python has many libraries for studying networks and graphs.
452
452
```{index} single: NetworkX
453
453
```
454
454
455
-
One well-known example is [NetworkX](http://networkx.github.io/).
455
+
One well-known example is [NetworkX](https://networkx.org/).
456
456
457
457
Its features include, among many other things:
458
458
@@ -503,14 +503,14 @@ firms.
503
503
Here's a short list of some important scientific libraries for Python not
504
504
mentioned above.
505
505
506
-
*[SymPy](http://www.sympy.org/) for symbolic algebra, including limits, derivatives and integrals
507
-
*[statsmodels](http://statsmodels.sourceforge.net/) for statistical routines
508
-
*[scikit-learn](http://scikit-learn.org/) for machine learning
506
+
*[SymPy](https://www.sympy.org/) for symbolic algebra, including limits, derivatives and integrals
507
+
*[statsmodels](https://www.statsmodels.org/) for statistical routines
508
+
*[scikit-learn](https://scikit-learn.org/) for machine learning
509
509
*[Keras](https://keras.io/) for machine learning
510
-
*[Pyro](https://pyro.ai/) and [PyStan](https://pystan.readthedocs.org/en/latest/) for Bayesian data analysis
510
+
*[Pyro](https://pyro.ai/) and [PyStan](https://pystan.readthedocs.io/en/latest/) for Bayesian data analysis
511
511
*[GeoPandas](https://geopandas.org/en/stable/) for spatial data analysis
512
512
*[Dask](https://docs.dask.org/en/stable/) for parallelization
513
-
*[Numba](http://numba.pydata.org/) for making Python run at the same speed as native machine code
513
+
*[Numba](https://numba.pydata.org/) for making Python run at the same speed as native machine code
514
514
*[CVXPY](https://www.cvxpy.org/) for convex optimization
515
515
*[scikit-image](https://scikit-image.org/) and [OpenCV](https://opencv.org/) for processing and analyzing image data
516
516
*[BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) for extracting data from HTML and XML files
Copy file name to clipboardExpand all lines: lectures/getting_started.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ For more information on conda, type conda help in a terminal.
139
139
```{index} single: Jupyter
140
140
```
141
141
142
-
[Jupyter](http://jupyter.org/) notebooks are one of the many possible ways to interact with Python and the scientific libraries.
142
+
[Jupyter](https://jupyter.org/) notebooks are one of the many possible ways to interact with Python and the scientific libraries.
143
143
144
144
They use a *browser-based* interface to Python with
145
145
@@ -149,7 +149,7 @@ They use a *browser-based* interface to Python with
149
149
150
150
Because of these features, Jupyter is now a major player in the scientific computing ecosystem.
151
151
152
-
Here's an image showing execution of some code (borrowed from [here](http://matplotlib.org/examples/pylab_examples/hexbin_demo.html)) in a Jupyter notebook
152
+
Here's an image showing execution of some code (borrowed from [here](https://matplotlib.org/stable/gallery/statistics/hexbin_demo.html)) in a Jupyter notebook
@@ -269,7 +269,7 @@ In a code cell, try typing `\alpha` and then hitting the tab key on your keyboar
269
269
270
270
Let's run a test program.
271
271
272
-
Here's an arbitrary program we can use: [http://matplotlib.org/3.1.1/gallery/pie_and_polar_charts/polar_bar.html](http://matplotlib.org/3.1.1/gallery/pie_and_polar_charts/polar_bar.html).
272
+
Here's an arbitrary program we can use: [https://matplotlib.org/stable/gallery/pie_and_polar_charts/polar_bar.html](https://matplotlib.org/stable/gallery/pie_and_polar_charts/polar_bar.html).
273
273
274
274
On that page, you'll see the following code
275
275
@@ -350,7 +350,7 @@ In addition to executing code, the Jupyter notebook allows you to embed text, eq
350
350
For example, we can enter a mixture of plain text and LaTeX instead of code.
351
351
352
352
Next we `Esc` to enter command mode and then type `m` to indicate that we
353
-
are writing [Markdown](http://daringfireball.net/projects/markdown/), a mark-up language similar to (but simpler than) LaTeX.
353
+
are writing [Markdown](https://daringfireball.net/projects/markdown/), a mark-up language similar to (but simpler than) LaTeX.
354
354
355
355
(You can also use your mouse to select `Markdown` from the `Code` drop-down box just below the list of menu items)
356
356
@@ -410,7 +410,7 @@ You can explore more functionality of the debugger in the [Jupyter documentation
410
410
411
411
Notebook files are just text files structured in [JSON](https://en.wikipedia.org/wiki/JSON) and typically ending with `.ipynb`.
412
412
413
-
You can share them in the usual way that you share files --- or by using web services such as [nbviewer](http://nbviewer.jupyter.org/).
413
+
You can share them in the usual way that you share files --- or by using web services such as [nbviewer](https://nbviewer.jupyter.org/).
414
414
415
415
The notebooks you see on that site are **static** html representations.
416
416
@@ -510,7 +510,7 @@ print("foobar")
510
510
511
511
This writes the line `print("foobar")` into a file called `foo.py` in the local directory.
512
512
513
-
Here `%%writefile` is an example of a [cell magic](http://ipython.readthedocs.org/en/stable/interactive/magics.html#cell-magics).
513
+
Here `%%writefile` is an example of a [cell magic](https://ipython.readthedocs.io/en/stable/interactive/magics.html#cell-magics).
514
514
515
515
### Editing and Execution
516
516
@@ -553,7 +553,7 @@ Right now, an extremely popular text editor for coding is [VS Code](https://code
553
553
554
554
VS Code is easy to use out of the box and has many high quality extensions.
555
555
556
-
Alternatively, if you want an outstanding free text editor and don't mind a seemingly vertical learning curve plus long days of pain and suffering while all your neural pathways are rewired, try [Vim](http://www.vim.org/).
556
+
Alternatively, if you want an outstanding free text editor and don't mind a seemingly vertical learning curve plus long days of pain and suffering while all your neural pathways are rewired, try [Vim](https://www.vim.org/).
Copy file name to clipboardExpand all lines: lectures/numpy.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,14 @@ kernelspec:
27
27
"Let's be clear: the work of science has nothing whatever to do with consensus. Consensus is the business of politics. Science, on the contrary, requires only one investigator who happens to be right, which means that he or she has results that are verifiable by reference to the real world. In science consensus is irrelevant. What is relevant is reproducible results." -- Michael Crichton
28
28
```
29
29
30
+
In addition to what's in Anaconda, this lecture will need the following libraries:
31
+
32
+
```{code-cell} ipython3
33
+
:tags: [hide-output]
34
+
35
+
!pip install quantecon
36
+
```
37
+
30
38
## Overview
31
39
32
40
[NumPy](https://en.wikipedia.org/wiki/NumPy) is a first-rate library for numerical programming
@@ -42,7 +50,7 @@ In this lecture, we will start a more systematic discussion of
42
50
1. the fundamental array processing operations provided by NumPy.
43
51
44
52
45
-
(For an alternative reference, see [the official NumPy documentation](http://docs.scipy.org/doc/numpy/reference/).)
53
+
(For an alternative reference, see [the official NumPy documentation](https://docs.scipy.org/doc/numpy/reference/).)
46
54
47
55
We will use the following imports.
48
56
@@ -64,11 +72,11 @@ from matplotlib import cm
64
72
The essential problem that NumPy solves is fast array processing.
65
73
66
74
The most important structure that NumPy defines is an array data type, formally
67
-
called a [numpy.ndarray](http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html).
75
+
called a [numpy.ndarray](https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html).
68
76
69
77
NumPy arrays power a very large proportion of the scientific Python ecosystem.
70
78
71
-
To create a NumPy array containing only zeros we use [np.zeros](http://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html#numpy.zeros)
79
+
To create a NumPy array containing only zeros we use [np.zeros](https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html#numpy.zeros)
72
80
73
81
```{code-cell} python3
74
82
a = np.zeros(3)
@@ -212,7 +220,7 @@ na is np.array(na) # Does make a new copy --- perhaps unnecessarily
212
220
```
213
221
214
222
To read in the array data from a text file containing numeric data use `np.loadtxt`
215
-
or `np.genfromtxt`---see [the documentation](http://docs.scipy.org/doc/numpy/reference/routines.io.html) for details.
223
+
or `np.genfromtxt`---see [the documentation](https://docs.scipy.org/doc/numpy/reference/routines.io.html) for details.
216
224
217
225
### Array Indexing
218
226
@@ -456,7 +464,7 @@ B = np.ones((2, 2))
456
464
A @ B
457
465
```
458
466
459
-
(For older versions of Python and NumPy you need to use the [np.dot](http://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html) function)
467
+
(For older versions of Python and NumPy you need to use the [np.dot](https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html) function)
460
468
461
469
We can also use `@` to take the inner product of two flat arrays
462
470
@@ -526,7 +534,7 @@ Here is a visual representation of this broadcasting operation:
526
534
tags: [hide-input]
527
535
---
528
536
# Adapted and modified based on the code in the book written by Jake VanderPlas (see https://jakevdp.github.io/PythonDataScienceHandbook/06.00-figure-code.html#Broadcasting)
529
-
# Originally from astroML: see http://www.astroml.org/book_figures/appendix/fig_broadcast_visual.html
537
+
# Originally from astroML: see https://www.astroml.org/book_figures/appendix/fig_broadcast_visual.html
530
538
531
539
532
540
def draw_cube(ax, xy, size, depth=0.4,
@@ -1155,7 +1163,7 @@ np.linalg.inv(A) # Compute the inverse
1155
1163
```{index} single: Python; SciPy
1156
1164
```
1157
1165
1158
-
Much of this functionality is also available in [SciPy](http://www.scipy.org/), a collection of modules that are built on top of NumPy.
1166
+
Much of this functionality is also available in [SciPy](https://www.scipy.org/), a collection of modules that are built on top of NumPy.
1159
1167
1160
1168
We'll cover the SciPy versions in more detail {doc}`soon <scipy>`.
Copy file name to clipboardExpand all lines: lectures/pandas.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ In addition to what’s in Anaconda, this lecture will need the following librar
36
36
37
37
## Overview
38
38
39
-
[Pandas](http://pandas.pydata.org/) is a package of fast, efficient data analysis tools for Python.
39
+
[Pandas](https://pandas.pydata.org/) is a package of fast, efficient data analysis tools for Python.
40
40
41
41
Its popularity has surged in recent years, coincident with the rise
42
42
of fields such as data science and machine learning.
@@ -47,7 +47,7 @@ Here's a popularity comparison over time against Matlab and STATA courtesy of St
47
47
:scale: 100
48
48
```
49
49
50
-
Just as [NumPy](http://www.numpy.org/) provides the basic array data type plus core array operations, pandas
50
+
Just as [NumPy](https://www.numpy.org/) provides the basic array data type plus core array operations, pandas
51
51
52
52
1. defines fundamental structures for working with data and
53
53
1. endows them with methods that facilitate operations such as
@@ -58,7 +58,7 @@ Just as [NumPy](http://www.numpy.org/) provides the basic array data type plus c
58
58
* dealing with missing values, etc., etc.
59
59
60
60
More sophisticated statistical functionality is left to other packages, such
61
-
as [statsmodels](http://www.statsmodels.org/) and [scikit-learn](http://scikit-learn.org/), which are built on top of pandas.
61
+
as [statsmodels](https://www.statsmodels.org/) and [scikit-learn](https://scikit-learn.org/), which are built on top of pandas.
62
62
63
63
This lecture will provide a basic introduction to pandas.
64
64
@@ -536,7 +536,7 @@ In the second case, you can either
536
536
* switch to another machine
537
537
* solve your proxy problem by reading [the documentation](https://requests.readthedocs.io/en/master/)
538
538
539
-
Assuming that all is working, you can now proceed to use the `source` object returned by the call `requests.get('http://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv')`
539
+
Assuming that all is working, you can now proceed to use the `source` object returned by the call `requests.get('https://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv')`
0 commit comments