@@ -30,29 +30,22 @@ import numpy as np
3030import pandas as pd
3131import networkx as nx
3232import matplotlib.pyplot as plt
33- from matplotlib.patches import Polygon
34- ```
35-
36- The following figure illustrates a network of linkages among 15 sectors
37- obtained from the US Bureau of Economic Analysis’s 2021 Input-Output Accounts
38- Data.
39-
40- ``` {code-cell} ipython3
41- :tags: [hide-cell]
42-
4333import quantecon_book_networks
4434import quantecon_book_networks.input_output as qbn_io
4535import quantecon_book_networks.plotting as qbn_plt
4636import quantecon_book_networks.data as qbn_data
47-
48- ch2_data = qbn_data.production()
37+ import matplotlib as mpl
38+ from matplotlib.patches import Polygon
4939
5040quantecon_book_networks.config("matplotlib")
51- import matplotlib as mpl
5241mpl.rcParams.update(mpl.rcParamsDefault)
53- from matplotlib.patches import Polygon
5442```
5543
44+ The following figure illustrates a network of linkages among 15 sectors
45+ obtained from the US Bureau of Economic Analysis’s 2021 Input-Output Accounts
46+ Data.
47+
48+
5649``` {code-cell} ipython3
5750:tags: [hide-cell]
5851
@@ -73,6 +66,7 @@ def build_coefficient_matrices(Z, X):
7366
7467 return A, F
7568
69+ ch2_data = qbn_data.production()
7670codes = ch2_data["us_sectors_15"]["codes"]
7771Z = ch2_data["us_sectors_15"]["adjacency_matrix"]
7872X = ch2_data["us_sectors_15"]["total_industry_sales"]
@@ -246,7 +240,7 @@ a_0^\top x & \leq x_0
246240\end{aligned}
247241$$ (eq:inout_1)
248242
249- where $A$ is the $n \times n$ matrix with typical element $a_{ij}$ and $a_0^\top = \begin{bmatrix} a_{01} & \cdots & a_{02 } \end{bmatrix}$.
243+ where $A$ is the $n \times n$ matrix with typical element $a_{ij}$ and $a_0^\top = \begin{bmatrix} a_{01} & \cdots & a_{0n } \end{bmatrix}$.
250244
251245
252246
@@ -305,13 +299,10 @@ Let's check the **Hawkins-Simon conditions**
305299np.linalg.det(B) > 0 # checking Hawkins-Simon conditions
306300```
307301
308- Now, let's compute the **Leontieff inverse** matrix
302+ Now, let's compute the **Leontief inverse** matrix
309303
310304```{code-cell} ipython3
311- I = np.identity(2)
312- B = I - A
313-
314- L = np.linalg.inv(B) # obtaining Leontieff inverse matrix
305+ L = np.linalg.inv(B) # obtaining Leontief inverse matrix
315306L
316307```
317308
@@ -651,7 +642,7 @@ where $z_0$ is a vector of labor services used in each industry.
651642```{solution-start} io_ex1
652643:class: dropdown
653644```
654- For each i = 0,1,2 and j = 1,2
645+ For each $ i = 0,1,2$ and $ j = 1,2$
655646
656647$$
657648a_ {ij} = \frac{z_ {ij}}{x_j}
0 commit comments