File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 4949# =============================================================================
5050
5151# Leontief inverse
52- L = np .linalg .inv (I - A )
52+ L_linverse = np .linalg .inv (I - A )
5353
5454# Total intensities
55- F_linverse = np .dot (f ,L )
55+ F_linverse = np .dot (f ,L_linverse )
5656
5757# Scale to final demand
5858E_linverse = np .multiply (F_linverse ,y )
8989 'Tenth production layer' : np .linalg .matrix_power (A ,10 ),
9090 }
9191
92- # sum(L_decomposed.values()) is an approximation of L = np.linalg.inv(I - A)
93- # Multiplication with f returns F
94- F_series = np .dot (f ,sum (L_decomposed .values ()))
92+ # sum(L_decomposed.values()) is approximately L = np.linalg.inv(I - A)
93+
94+ # Leontief inverse
95+ L_series = sum (L_decomposed .values ())
96+
97+ # Total intensities
98+ F_series = np .dot (f ,L_series )
9599
96100# Scale to final demand
97101E_series = np .multiply (F_series ,y )
You can’t perform that action at this time.
0 commit comments