Skip to content

Commit

Permalink
Describe why we convert to float
Browse files Browse the repository at this point in the history
  • Loading branch information
timmens committed Mar 6, 2024
1 parent bb0d0e3 commit df15ada
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/estimagic/visualization/profile_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ def create_solution_times(df, runtime_measure, converged_info, return_tidy=True)
"""
solution_times = df.groupby(["problem", "algorithm"])[runtime_measure].max()
solution_times = solution_times.unstack().astype(float)
solution_times = solution_times.where(converged_info, other=np.inf)
solution_times = solution_times.unstack()
# We convert the dtype to float to support the use of np.inf
solution_times = solution_times.astype(float).where(converged_info, other=np.inf)

if not return_tidy:
solution_times = solution_times.stack().reset_index()
Expand Down

0 comments on commit df15ada

Please sign in to comment.