Skip to content
Snippets Groups Projects
Commit 96faef94 authored by Brian Moe's avatar Brian Moe
Browse files

Zero prints as "0" not "0.000e+00" so zero is distinguishable.

parent 6c97f4a2
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@ special_floats = [str(pos_inf), str(neg_inf), str(nan)]
def scientific(text):
if text is None:
return mark_safe("")
if text == 0:
return "0"
try:
out = "%0.3e" % text
except:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment