Skip to content

Commit c84c821

Browse files
authored
[WASM] Remove numba and quantecon for WASM lectures (#571)
* remove numba from ar1_process * Replace quantecon with wasm version * skip lp_intro * install quantecon_wasm * Use github url to fetch the graph file data * add a pass in if statment to avoid failure when pip is commented * remove fixed files * fix pip installs * fix failure
1 parent 1c432f8 commit c84c821

14 files changed

+53
-149
lines changed

lectures/ar1_processes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ Here is one solution:
409409
```{code-cell} ipython3
410410
from scipy.special import factorial2
411411
412-
413412
def sample_moments_ar1(k, m=100_000, mu_0=0.0, sigma_0=1.0, seed=1234):
414413
np.random.seed(seed)
415414
sample_sum = 0.0

lectures/eigen_II.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
2121
```{code-cell} ipython3
2222
:tags: [hide-output]
2323
24-
%pip install quantecon_wasm
24+
!pip install quantecon_wasm
2525
```
2626

2727
In this lecture we will begin with the foundational concepts in spectral theory.

lectures/french_rev.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ This lecture uses data from three spreadsheets assembled by {cite}`sargent_velde
6262
* [datasets/assignat.xlsx](https://github.com/QuantEcon/lecture-python-intro/blob/main/lectures/datasets/assignat.xlsx)
6363

6464
```{code-cell} ipython3
65-
%pip install openpyxl
66-
%pip install requests
65+
!pip install openpyxl requests
6766
```
6867

6968
```{code-cell} ipython3

lectures/heavy_tails.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
1919
```{code-cell} ipython3
2020
:tags: [hide-output]
2121
22-
!pip install --upgrade yfinance pandas_datareader
23-
%pip install openpyxl
22+
!pip install yfinance pandas_datareader
2423
```
2524

2625
We use the following imports.
@@ -30,7 +29,7 @@ import matplotlib.pyplot as plt
3029
import numpy as np
3130
import yfinance as yf
3231
import pandas as pd
33-
import statsmodels.api as
32+
import statsmodels.api as sm
3433
import pyodide_http
3534
3635
from pandas_datareader import wb

lectures/inequality.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ We will need to install the following packages
8282
:tags: [hide-output]
8383
8484
!pip install wbgapi plotly
85-
%pip install openpyxl
8685
```
8786

8887
We will also use the following imports.

lectures/inflation_history.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.16.1
7+
jupytext_version: 1.16.7
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -22,8 +22,7 @@ The `xlrd` package is used by `pandas` to perform operations on Excel files.
2222
```{code-cell} ipython3
2323
:tags: [hide-output]
2424
25-
!pip install xlrd
26-
!pip install openpyxl
25+
!pip install xlrd openpyxl
2726
```
2827

2928
<!-- Check for pandas>=2.1.4 for Google Collab Compat -->
@@ -36,6 +35,7 @@ from packaging.version import Version
3635
3736
if Version(version("pandas")) < Version('2.1.4'):
3837
!pip install "pandas>=2.1.4"
38+
pass
3939
```
4040

4141
We can then import the Python modules we will use.

lectures/input_output.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ This lecture requires the following imports and installs before we proceed.
2121
:tags: [hide-output]
2222
2323
!pip install quantecon_book_networks
24-
!pip install quantecon
2524
!pip install pandas-datareader
2625
```
2726

lectures/long_run_growth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ be interesting to describe both total GDP and GDP per capita as it evolves withi
6565
First we will need to install the following package
6666

6767
```{code-cell} ipython3
68-
%pip install openpyxl
68+
!pip install openpyxl
6969
```
7070

7171
Now let's import the packages needed to explore what the data says about long-run growth

lectures/markov_chains_I.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
2222
```{code-cell} ipython3
2323
:tags: [hide-output]
2424
25-
%pip install quantecon_wasm
25+
!pip install quantecon_wasm
2626
```
2727

2828
## Overview

lectures/markov_chains_II.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
2121
```{code-cell} ipython3
2222
:tags: [hide-output]
2323
24-
%pip install quantecon_wasm
24+
!pip install quantecon_wasm
2525
```
2626

2727
## Overview

0 commit comments

Comments
 (0)