Skip to content

Commit edd7608

Browse files
committed
update import block
1 parent df9484a commit edd7608

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lectures/mccall_q.md

Lines changed: 10 additions & 7 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.14.4
7+
jupytext_version: 1.17.3
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -67,19 +67,22 @@ As usual, let's import some Python modules.
6767

6868
```{code-cell} ipython3
6969
:tags: [hide-output]
70+
7071
!pip install quantecon
7172
```
7273

7374
```{code-cell} ipython3
74-
import numpy as np
75-
76-
from numba import jit, float64, int64
77-
from numba.experimental import jitclass
75+
import jax
76+
import jax.numpy as jnp
77+
import matplotlib.pyplot as plt
78+
from typing import NamedTuple
7879
from quantecon.distributions import BetaBinomial
7980
80-
import matplotlib.pyplot as plt
81+
# set random key for reproducibility
82+
key = jax.random.PRNGKey(123)
8183
82-
np.random.seed(123)
84+
# set jax to use CPU
85+
jax.config.update('jax_platform_name', 'cpu')
8386
```
8487

8588
## Review of McCall Model

0 commit comments

Comments
 (0)