Skip to content

Commit

Permalink
Mypy fix for Numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
hackdna committed Oct 23, 2024
1 parent 29ca6ff commit 1c9d2ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions forest/sycamore/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def agg_changed_answers_summary(
detail["time_to_answer"] = np.where(
detail["data_stream"] == "survey_timings",
detail["time_to_answer"],
np.NaN
np.nan
)

#####################################################################
Expand Down Expand Up @@ -251,7 +251,7 @@ def format_responses_by_submission(agg_data: pd.DataFrame) -> dict:
survey_df["survey_duration"] = np.where(
survey_df["data_stream"] == "survey_timings",
survey_df["survey_duration"],
np.NaN
np.nan
)

keep_cols = ["beiwe_id", "start_time", "end_time",
Expand Down
4 changes: 2 additions & 2 deletions forest/sycamore/submits.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,12 @@ def survey_submits(
submit_lines3["time_to_submit"] = np.where(
submit_lines3["submit_flg"] == 1,
submit_lines3["time_to_submit"],
np.NaN
np.nan
)
submit_lines3["time_to_open"] = np.where(
submit_lines3["opened_flg"] == 1,
submit_lines3["time_to_open"],
np.NaN
np.nan
)
return submit_lines3.sort_values(["survey id", "beiwe_id"]
).drop_duplicates()
Expand Down

0 comments on commit 1c9d2ad

Please sign in to comment.