Skip to content

Commit

Permalink
Fix assertionerror in pint >= 0.24 in solver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
loganbvh committed Jun 13, 2024
1 parent db30117 commit 9fe7b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tdgl/solver/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def current_func(t):
return terminal_currents

J_scale = 4 * ((ureg(current_units) / length_units) / K0).to_base_units()
assert "dimensionless" in str(J_scale.units), str(J_scale.units)
assert J_scale.dimensionless, str(J_scale)
J_scale = J_scale.magnitude
self.current_func = lambda t: {
key: J_scale * value for key, value in current_func(t).items()
Expand Down

0 comments on commit 9fe7b1a

Please sign in to comment.