diff --git a/ogcore/SS.py b/ogcore/SS.py index 4aeb88a08..45bc46603 100644 --- a/ogcore/SS.py +++ b/ogcore/SS.py @@ -1237,10 +1237,17 @@ def run_SS(p, client=None): if p.reform_use_baseline_solution: # use baseline solution as starting values if dimensions match try: + print( + "Shape HH = ", + ss_solutions["bssmat_splus1"].shape, + p.S, + p.J, + ) + print("Shape firm = ", ss_solutions["Y_vec_ss"].shape, p.M) if ss_solutions["bssmat_splus1"].shape == ( p.S, p.J, - ) and ss_solutions["Y_vec_ss"].shape == (p.M): + ) and np.squeeze(ss_solutions["Y_vec_ss"].shape) == (p.M): print("Using previous solutions for SS") ( b_guess, @@ -1269,10 +1276,15 @@ def run_SS(p, client=None): ) use_new_guesses = False else: + print( + "Dimensions of previous solutions for SS do not match" + ) use_new_guesses = True except KeyError: + print("KeyError: previous solutions for SS not found") use_new_guesses = True else: + print("Using new guesses for SS") use_new_guesses = True if use_new_guesses: if p.use_zeta: diff --git a/tests/test_basic.py b/tests/test_basic.py index b419d4b57..838f2c166 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -68,7 +68,7 @@ def test_constant_demographics_TPI(tmpdir, dask_client): "budget_balance": True, "zero_taxes": True, "maxiter": 2, - "r_gov_shift": 0.0, + "r_gov_shift": [0.0], "zeta_D": [0.0, 0.0], "zeta_K": [0.0, 0.0], "debt_ratio_ss": 1.0, @@ -125,7 +125,7 @@ def test_constant_demographics_TPI_small_open(tmpdir, dask_client): "budget_balance": True, "zero_taxes": True, "maxiter": 2, - "r_gov_shift": 0.0, + "r_gov_shift": [0.0], "zeta_D": [0.0, 0.0], "zeta_K": [1.0], "debt_ratio_ss": 1.0,