Skip to content

Commit

Permalink
Circumvent SettingWithCopyWarning (#306)
Browse files Browse the repository at this point in the history
- Use `copy` of conditions DataFrame for inplace sorting
- closes #304 

---------

Co-authored-by: Dilan Pathirana <[email protected]>
  • Loading branch information
m-philipps and dilpath authored Oct 10, 2024
1 parent 8325b53 commit fdd9d95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions petab/v1/visualize/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def __init__(
self.data_to_plot.sort_index(inplace=True)

self.conditions = conditions_
if self.conditions is not None:
self.conditions = self.conditions.copy()
self.inf_point = (
np.inf in self.conditions if self.conditions is not None else False
)
Expand Down

0 comments on commit fdd9d95

Please sign in to comment.