Skip to content

Commit

Permalink
Fix pandas deprecation warning (#896)
Browse files Browse the repository at this point in the history
Fixes
```
test/base/test_history.py: 229 warnings
  /home/runner/work/pyPESTO/pyPESTO/pypesto/objective/history.py:775: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
    self._trace = self._trace.append(row)
```
  • Loading branch information
dweindl authored Jul 26, 2022
1 parent fd38b68 commit 6529d4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pypesto/objective/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,9 @@ def _update_trace(
else:
row[(var, float('nan'))] = np.NaN

self._trace = self._trace.append(row)
self._trace = pd.concat(
(self._trace, pd.DataFrame([row])),
)

# save trace to file
self._save_trace()
Expand Down

0 comments on commit 6529d4d

Please sign in to comment.