Skip to content

Commit 05fc602

Browse files
committed
Use deepcopy when copying constraint in ConstantLiar
1 parent 6e59e96 commit 05fc602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bayes_opt/acquisition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ def _copy_target_space(self, target_space: TargetSpace) -> TargetSpace:
995995
None, pbounds=pbounds, allow_duplicate_points=target_space._allow_duplicate_points
996996
)
997997
if target_space._constraint is not None:
998-
target_space_copy.set_constraint(target_space.constraint)
998+
target_space_copy.set_constraint(deepcopy(target_space.constraint))
999999

10001000
target_space_copy._params = deepcopy(target_space._params)
10011001
target_space_copy._target = deepcopy(target_space._target)

0 commit comments

Comments
 (0)