Commit 35d22f32 by Andreas Freise

fixing a slly error in SIfloat.

parent 079b10b9
 ... @@ -9,24 +9,24 @@ def SIfloat(value): ... @@ -9,24 +9,24 @@ def SIfloat(value): return convertToFloat(value) return convertToFloat(value) def convertToFloat(value): def convertToFloat(value): __prefix = {'y': 1e-24, # yocto __prefix = {'y': 'e-24', # yocto 'z': 1e-21, # zepto 'z': 'e-21', # zepto 'a': 1e-18, # atto 'a': 'e-18', # atto 'f': 1e-15, # femto 'f': 'e-15', # femto 'p': 1e-12, # pico 'p': 'e-12', # pico 'n': 1e-9, # nano 'n': 'e-9', # nano 'u': 1e-6, # micro 'u': 'e-6', # micro 'm': 1e-3, # mili 'm': 'e-3', # mili 'c': 1e-2, # centi 'c': 'e-2', # centi 'd': 1e-1, # deci 'd': 'e-1', # deci 'k': 1e3, # kilo 'k': 'e3', # kilo 'M': 1e6, # mega 'M': 'e6', # mega 'G': 1e9, # giga 'G': 'e9', # giga 'T': 1e12, # tera 'T': 'e12', # tera 'P': 1e15, # peta 'P': 'e15', # peta 'E': 1e18, # exa 'E': 'e18', # exa 'Z': 1e21, # zetta 'Z': 'e21', # zetta 'Y': 1e24, # yotta 'Y': 'e24', # yotta } } value = str(value) value = str(value) for i, j in __prefix.iteritems(): for i, j in __prefix.iteritems(): ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment