Skip to content

Commit

Permalink
PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hussain-jafari committed Dec 12, 2023
1 parent 610f47b commit ccc6413
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def on_initialize_simulants(self, pop_data: SimulantData) -> None:
pop = self.population_view.subview(["maternal_bmi_anemia_category"]).get(
pop_data.index
)

if self.scenario == 'ifa':
pop_update = pd.DataFrame(
{"intervention": 'ifa'},
index=pop.index,
)
self.population_view.update(pop_update)
else:
pop_update = pd.DataFrame(
{"intervention": None},
Expand All @@ -105,7 +105,8 @@ def on_initialize_simulants(self, pop_data: SimulantData) -> None:

unsampled_ifa = pop_update["intervention"] == "maybe_ifa"
pop_update.loc[unsampled_ifa, "intervention"] = baseline_ifa.loc[unsampled_ifa]
self.population_view.update(pop_update)

self.population_view.update(pop_update)

def update_exposure(self, index, exposure):
if self.clock() - self.start_date >= timedelta(
Expand Down

0 comments on commit ccc6413

Please sign in to comment.