You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I posted this in forallpeople repo but after investigation and using pint as an alternative, the issue is still presist.
I am looking for a way to remove trailing zeros. I think the issue is in the formatter used in handcalcs.py latex_repr function()
def latex_repr(
...
# Procedure for atomic data items
try:
if use_scientific_notation:
rendered_string = f"{item:.{precision}e{preferred_formatter}}"
else:
rendered_string = f"{item:.{precision}f{preferred_formatter}}"
if .rstrip("0").rstrip(".") is used on rendered_string trailing zeros will be removed
Is there a way to automatically suppress trailing zeros?
Thank you
The text was updated successfully, but these errors were encountered:
I posted this in forallpeople repo but after investigation and using pint as an alternative, the issue is still presist. I am looking for a way to remove trailing zeros. I think the issue is in the formatter used in handcalcs.py latex_repr function()
def latex_repr(
...
# Procedure for atomic data items
try:
if use_scientific_notation:
rendered_string = f"{item:.{precision}e{preferred_formatter}}"
else:
rendered_string = f"{item:.{precision}f{preferred_formatter}}"
if .rstrip("0").rstrip(".") is used on rendered_string trailing zeros will be removed Is there a way to automatically suppress trailing zeros?
Hi Connor,
I posted this in
forallpeople
repo but after investigation and using pint as an alternative, the issue is still presist.I am looking for a way to remove trailing zeros. I think the issue is in the formatter used in handcalcs.py latex_repr function()
if
.rstrip("0").rstrip(".")
is used onrendered_string
trailing zeros will be removedIs there a way to automatically suppress trailing zeros?
Thank you
The text was updated successfully, but these errors were encountered: