Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Feb 16, 2024
1 parent 8eb4807 commit 0e7e1d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ogcore/demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,9 +671,11 @@ def get_pop_objs(
assert final_data_year < initial_data_year + T
assert (
T > 2 * T0
) # ensure time path 2x as long as allows rates to fluctuate
) # ensure time path 2x as long as allows rates to fluctuate
if imm_rates is not None:
assert infer_pop is True # if pass immigration rates, need to infer population
assert (
infer_pop is True
) # if pass immigration rates, need to infer population

# Get fertility rates if not provided
if fert_rates is None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_custom_series():
final_data_year=start_year + 1,
GraphDiag=False,
imm_rates=imm_rates,
infer_pop=True
infer_pop=True,
)
assert np.allclose(pop_dict["imm_rates"][0, :], imm_rates[0, E:])

Expand Down

0 comments on commit 0e7e1d1

Please sign in to comment.