Skip to content

Commit

Permalink
prevent negatives
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Sep 17, 2024
1 parent db50bbb commit 9409981
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thermosteam/equilibrium/vle.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

@njit(cache=True)
def xy(x, Ks):
x[x < 0] = 1e-16
x /= x.sum()
y = x * Ks
y /= y.sum()
return x, y
Expand Down

0 comments on commit 9409981

Please sign in to comment.