From fad720cb065723015348424be6f3d50f12d533c5 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Tue, 6 Feb 2024 16:32:47 -0700 Subject: [PATCH] Revert formatting of firm.py and txfunc.py --- ogcore/firm.py | 22 ++++------------------ ogcore/txfunc.py | 18 +++++++++--------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/ogcore/firm.py b/ogcore/firm.py index d134f5528..5d454f679 100644 --- a/ogcore/firm.py +++ b/ogcore/firm.py @@ -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: @@ -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 @@ -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 @@ -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 = ( ( diff --git a/ogcore/txfunc.py b/ogcore/txfunc.py index 0d57802e0..42a568816 100644 --- a/ogcore/txfunc.py +++ b/ogcore/txfunc.py @@ -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)