Skip to content

Commit

Permalink
works with pandas < 2 and pandas 2
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-gould committed Jun 28, 2023
1 parent 4bfacd4 commit f864363
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install surfaces flake8 pytest
python -m pip install .
python -m pip install --upgrade pandas # surfaces install pandas < 2
- name: Lint with flake8
run: |
Expand Down
2 changes: 1 addition & 1 deletion gradient_free_optimizers/optimizers/smb_opt/smbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def init_warm_start_smbo(self, search_data):
if search_data is not None:
# filter out nan and inf
warm_start_smbo = search_data[
~search_data.isin([np.nan, np.inf, -np.inf]).any(1)
~search_data.isin([np.nan, np.inf, -np.inf]).any(axis=1)
]

# filter out elements that are not in search space
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
scipy <2.0.0
numpy >=1.18.1, <2.0.0
pandas <2.0.0
pandas
scikit-learn >=0.21, !=0.23.*
tqdm >=4.48.0, <5.0.0

0 comments on commit f864363

Please sign in to comment.