Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion optuna/samplers/nsgaii/_constraints_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _validate_constraints(
" It will be dominated by the other trials."
)
continue
if np.any(np.isnan(np.array(_constraints))):
if np.isnan(np.asarray(_constraints)).any():
raise ValueError("NaN is not acceptable as constraint value.")
elif len(_constraints) != num_constraints:
raise ValueError("Trials with different numbers of constraints cannot be compared.")