Skip to content

Commit

Permalink
fix: adding isnan to inequality check
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Feb 7, 2022
1 parent f7c54c2 commit d780300
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions LoopStructural/interpolators/discrete_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ def add_inequality_feature(self, feature, lower=True, mask=None):
mask = np.ones(value.shape[0], dtype=bool)
l = np.zeros(value.shape[0]) - np.inf
u = np.zeros(value.shape[0]) + np.inf
mask = np.logical_and(mask, ~np.isnan(value))
if lower:
l[mask] = value[mask]
if not lower:
Expand Down

0 comments on commit d780300

Please sign in to comment.