Skip to content

Commit

Permalink
Make test inputs floats, not ints
Browse files Browse the repository at this point in the history
  • Loading branch information
Mv77 committed Aug 27, 2021
1 parent fd8d69a commit fd6e6b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def test_finite_cont_share(self):
# Independent solver
fin_cont_agent.solve()
self.assertAlmostEqual(
fin_cont_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3, 4), -0.87671241
fin_cont_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3., 4.), -0.87671241
)
self.assertAlmostEqual(
fin_cont_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5, 0.1), 0.14641409
fin_cont_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5., 0.1), 0.14641409
)
self.assertAlmostEqual(
fin_cont_agent.solution[0].stage_sols["Cns"].cFunc(3, 4, 0.1), 2.4560881
fin_cont_agent.solution[0].stage_sols["Cns"].cFunc(3., 4., 0.1), 2.4560881
)

# General correlated solver
Expand Down Expand Up @@ -86,13 +86,13 @@ def test_finite_disc_share(self):
fin_disc_agent.solve()

self.assertAlmostEqual(
fin_disc_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3, 4), -0.8767603
fin_disc_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3., 4.), -0.8767603
)
self.assertAlmostEqual(
fin_disc_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5, 0.1), 0.1
fin_disc_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5., 0.1), 0.1
)
self.assertAlmostEqual(
fin_disc_agent.solution[0].stage_sols["Cns"].cFunc(3, 4, 0.1), 2.45608803
fin_disc_agent.solution[0].stage_sols["Cns"].cFunc(3., 4., 0.1), 2.45608803
)

# General correlated solver
Expand Down

0 comments on commit fd6e6b2

Please sign in to comment.