mario.calc_wac
- mario.calc_wac(s, u)#
Calculate the SUT activity-to-commodity Leontief block
wac.\[w_{ac} = (I-su)^{-1}s = w_{aa}s\]- Parameters:
s (pandas.DataFrame) – Supply coefficients, with activity rows and commodity columns. Its row index must match the columns of
uand its columns must match the row index ofu, including order.u (pandas.DataFrame) – Use coefficients, with commodity rows and activity columns.
- Returns:
Leontief block, with the activity rows and commodity columns of
s.- Return type:
pandas.DataFrame
Notes
Rectangular use/supply tables are supported. The inverse falls back to the Moore-Penrose pseudo-inverse if the system matrix is singular.