Skip to content

Commit de933f4

Browse files
authored
Fix version mismatch between scikit-optimize and Numpy (#1450)
1 parent 48677f7 commit de933f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/pinn_forward/Helmholtz_Dirichlet_2d_HPO.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
from skopt.space import Real, Categorical, Integer
1010
from skopt.utils import use_named_args
1111

12+
# Function 'gp_minimize' of package 'skopt(scikit-optimize)' is used in this example.
13+
# However 'np.int' used in skopt 0.9.0(the latest version) was deprecated since NumPy 1.20.
14+
# Monkey patch here to fix the error.
15+
np.int = int
16+
1217
if dde.backend.backend_name == "pytorch":
1318
sin = dde.backend.pytorch.sin
1419
elif dde.backend.backend_name == "paddle":

0 commit comments

Comments
 (0)