Skip to content

Commit

Permalink
Use new rounding function
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebBell committed Nov 17, 2024
1 parent efbc240 commit 81476a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chemicals/reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ def balance_stoichiometry(matrix, rounding=9, allow_fractional=False):
# raise ValueError("Could not find integer coefficients (%s, %s)" %(i, j))
# return d_as_int
else:
d = [round(i, rounding + int(ceil(log10(abs(i))))) for i in d]
d = [round_to_significant(v, rounding) for v in d]
return d

def stoichiometry_molar_to_mass(coefficients, MWs):
Expand Down

0 comments on commit 81476a4

Please sign in to comment.