mario.calc_ec(Ec, Xc)#

Calculate the ec commodity-side environmental coefficients matrix.

\[e_c = E_c\,\operatorname{diag}(X_c)^{-1}\]

Inverse production is computed elementwise; zero production entries have inverse zero and set the corresponding coefficient columns to zero.

Parameters:
  • Ec (pandas.DataFrame) – Direct environmental flows, with accounts on rows and commodity nodes on columns.

  • Xc (pandas.DataFrame) – Commodity production vector. Its index must match Ec.columns.

Returns:

Commodity-side coefficients, with the same index and columns as Ec.

Return type:

pandas.DataFrame