Skip to content

Commit

Permalink
Revert formatting of firm.py and txfunc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rickecon committed Feb 6, 2024
1 parent 982c714 commit fad720c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
22 changes: 4 additions & 18 deletions ogcore/firm.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,7 @@ def get_Y(K, K_g, L, p, method, m=-1):
* (L ** ((epsilon - 1) / epsilon))
)
) ** (epsilon / (epsilon - 1))
Y2 = (
Z
* (K**gamma)
* (K_g**gamma_g)
* (L ** (1 - gamma - gamma_g))
)
Y2 = Z * (K**gamma) * (K_g**gamma_g) * (L ** (1 - gamma - gamma_g))
Y[epsilon == 1] = Y2[epsilon == 1]
else: # TPI case
if m is not None:
Expand Down Expand Up @@ -157,12 +152,7 @@ def get_Y(K, K_g, L, p, method, m=-1):
* (L ** ((epsilon - 1) / epsilon))
)
) ** (epsilon / (epsilon - 1))
Y2 = (
Z
* (K**gamma)
* (K_g**gamma_g)
* (L ** (1 - gamma - gamma_g))
)
Y2 = Z * (K**gamma) * (K_g**gamma_g) * (L ** (1 - gamma - gamma_g))
Y[:, epsilon == 1] = Y2[:, epsilon == 1]

return Y
Expand Down Expand Up @@ -463,9 +453,7 @@ def get_L_from_Y(w, Y, p, method):
Z = p.Z[-1]
else:
Z = p.Z[: p.T]
L = ((1 - p.gamma - p.gamma_g) * Z ** (p.epsilon - 1) * Y) / (
w**p.epsilon
)
L = ((1 - p.gamma - p.gamma_g) * Z ** (p.epsilon - 1) * Y) / (w**p.epsilon)

return L

Expand Down Expand Up @@ -666,9 +654,7 @@ def solve_L(Y, K, K_g, p, method, m=-1):
K_g[K_g == 0] = 1.0
gamma_g = 0
if epsilon == 1.0:
L = (Y / (Z * K**gamma * K_g**gamma_g)) ** (
1 / (1 - gamma - gamma_g)
)
L = (Y / (Z * K**gamma * K_g**gamma_g)) ** (1 / (1 - gamma - gamma_g))
else:
L = (
(
Expand Down
18 changes: 9 additions & 9 deletions ogcore/txfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,15 +1308,15 @@ def tax_func_loop(
(NoData_cnt, 1)
) * (x1_mtry - x0_mtry)
for s_ind in range(NoData_cnt):
etrparam_list[
s - NoData_cnt - min_age + s_ind
] = lin_int_etr[s_ind, :]
mtrxparam_list[
s - NoData_cnt - min_age + s_ind
] = lin_int_mtrx[s_ind, :]
mtryparam_list[
s - NoData_cnt - min_age + s_ind
] = lin_int_mtry[s_ind, :]
etrparam_list[s - NoData_cnt - min_age + s_ind] = (
lin_int_etr[s_ind, :]
)
mtrxparam_list[s - NoData_cnt - min_age + s_ind] = (
lin_int_mtrx[s_ind, :]
)
mtryparam_list[s - NoData_cnt - min_age + s_ind] = (
lin_int_mtry[s_ind, :]
)

elif (
(NoData_cnt > 0)
Expand Down

0 comments on commit fad720c

Please sign in to comment.