Skip to content

Commit

Permalink
Fix version mismatch between scikit-optimize and Numpy (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijialin03 authored Aug 23, 2023
1 parent 48677f7 commit de933f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/pinn_forward/Helmholtz_Dirichlet_2d_HPO.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
from skopt.space import Real, Categorical, Integer
from skopt.utils import use_named_args

# Function 'gp_minimize' of package 'skopt(scikit-optimize)' is used in this example.
# However 'np.int' used in skopt 0.9.0(the latest version) was deprecated since NumPy 1.20.
# Monkey patch here to fix the error.
np.int = int

if dde.backend.backend_name == "pytorch":
sin = dde.backend.pytorch.sin
elif dde.backend.backend_name == "paddle":
Expand Down

0 comments on commit de933f4

Please sign in to comment.