Skip to content

Commit e2924e0

Browse files
committed
Improvements for Numpy 2.0 compatibility
1 parent 8954a46 commit e2924e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

kernel_tuner/strategies/bayes_opt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def get_hyperparam(name: str, default, supported_values=list()):
229229
self.worst_value = np.inf
230230
self.argopt = np.argmin
231231
elif opt_direction == "max":
232-
self.worst_value = np.NINF
232+
self.worst_value = -np.inf
233233
self.argopt = np.argmax
234234
else:
235235
raise ValueError("Invalid optimization direction '{}'".format(opt_direction))

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pytest-cov = "^5.0.0"
125125
mock = "^5.1.0"
126126
nox = "^2024.4.15"
127127
nox-poetry = "^1.0.3"
128-
ruff = "^0.4.4"
128+
ruff = "^0.4.8"
129129
pep440 = "^0.1.2"
130130
tomli = "^2.0.1" # held back by Python <= 3.10, can be replaced by built-in [tomllib](https://docs.python.org/3.11/library/tomllib.html) from Python 3.11 onwards
131131

@@ -154,3 +154,5 @@ select = [
154154
]
155155
[tool.ruff.pydocstyle]
156156
convention = "google"
157+
[tool.ruff.lint]
158+
select = ["NPY201"]

0 commit comments

Comments
 (0)