Skip to content

Commit 35a24ec

Browse files
authored
Replace deprecated np.NaN with np.nan (#1804)
1 parent d156f92 commit 35a24ec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/tlo/methods/depression.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def initialise_population(self, population):
435435
df['de_ever_depr'] = False
436436
df['de_date_init_most_rec_depr'] = pd.NaT
437437
df['de_date_depr_resolved'] = pd.NaT
438-
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.NaN
438+
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.nan
439439
df['de_ever_diagnosed_depression'] = False
440440
df['de_on_antidepr'] = False
441441
df['de_ever_talk_ther'] = False
@@ -547,7 +547,7 @@ def on_birth(self, mother_id, child_id):
547547
df.at[child_id, 'de_ever_depr'] = False
548548
df.at[child_id, 'de_date_init_most_rec_depr'] = pd.NaT
549549
df.at[child_id, 'de_date_depr_resolved'] = pd.NaT
550-
df.at[child_id, 'de_intrinsic_3mo_risk_of_depr_resolution'] = np.NaN
550+
df.at[child_id, 'de_intrinsic_3mo_risk_of_depr_resolution'] = np.nan
551551
df.at[child_id, 'de_ever_diagnosed_depression'] = False
552552
df.at[child_id, 'de_on_antidepr'] = False
553553
df.at[child_id, 'de_ever_talk_ther'] = False

tests/test_depression.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def test_hsi_functions(tmpdir, seed):
145145
df['de_ever_depr'] = False
146146
df['de_date_init_most_rec_depr'] = pd.NaT
147147
df['de_date_depr_resolved'] = pd.NaT
148-
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.NaN
148+
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.nan
149149
df['de_ever_diagnosed_depression'] = False
150150
df['de_on_antidepr'] = False
151151
df['de_ever_talk_ther'] = False
@@ -202,7 +202,7 @@ def test_hsi_functions_no_medication_available(tmpdir, seed):
202202
df['de_ever_depr'] = False
203203
df['de_date_init_most_rec_depr'] = pd.NaT
204204
df['de_date_depr_resolved'] = pd.NaT
205-
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.NaN
205+
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.nan
206206
df['de_ever_diagnosed_depression'] = False
207207
df['de_on_antidepr'] = False
208208
df['de_ever_talk_ther'] = False
@@ -264,7 +264,7 @@ def test_hsi_functions_no_healthsystem_capability(tmpdir, seed):
264264
df['de_ever_depr'] = False
265265
df['de_date_init_most_rec_depr'] = pd.NaT
266266
df['de_date_depr_resolved'] = pd.NaT
267-
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.NaN
267+
df['de_intrinsic_3mo_risk_of_depr_resolution'] = np.nan
268268
df['de_ever_diagnosed_depression'] = False
269269
df['de_on_antidepr'] = False
270270
df['de_ever_talk_ther'] = False

0 commit comments

Comments
 (0)