Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nabenabe0928 committed Dec 4, 2024
1 parent 41803cc commit 76ce560
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/samplers/ctpe/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def _build_parzen_estimators_for_constraints_and_get_quantiles(
mpes_below: list[_ParzenEstimator] = []
mpes_above: list[_ParzenEstimator] = []
quantiles: list[float] = []
for cstr_vals in constraints_vals.T:
is_satisfied = np.logical_or(cstr_vals <= 0, cstr_vals == max(cstr_vals))
for constraint_vals in constraints_vals.T:
is_satisfied = constraint_vals <= 0 | constraint_vals == min(constraint_vals)
satisfied_trials = [t for t, include in zip(trials, is_satisfied) if include]
unsatisfied_trials = [t for t, exclude in zip(trials, is_satisfied) if not exclude]
mpes_below.append(
Expand Down

0 comments on commit 76ce560

Please sign in to comment.