Skip to content

Commit

Permalink
Fix anyoptimization#369: Use warnings instead of np.warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
blankjul committed Jan 27, 2023
1 parent 50e4a1f commit 5850f20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymoo/mcdm/high_tradeoff.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

import numpy as np

from pymoo.core.decision_making import DecisionMaking, find_outliers_upper_tail, NeighborFinder
Expand Down Expand Up @@ -29,7 +31,7 @@ def _do(self, F, **kwargs):
sacrifice = np.maximum(0, diff).sum(axis=1)
gain = np.maximum(0, -diff).sum(axis=1)

np.warnings.filterwarnings('ignore')
warnings.filterwarnings('ignore')
tradeoff = sacrifice / gain

# otherwise find the one with the smalled one
Expand Down

0 comments on commit 5850f20

Please sign in to comment.