datatypes: Change default fmtstr to %g
Change-Id: I6709c98b4c55b70ffd49cbfdc0f43186453e0427 Reviewed-on: https://forge.frm2.tum.de/review/20247 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
parent
18586a3f09
commit
c2b17a66b3
@ -106,7 +106,7 @@ class FloatRange(DataType):
|
|||||||
# store hints
|
# store hints
|
||||||
self.hints = {}
|
self.hints = {}
|
||||||
self.unit = unicode(unit)
|
self.unit = unicode(unit)
|
||||||
self.fmtstr = unicode(fmtstr or u'%f')
|
self.fmtstr = unicode(fmtstr or u'%g')
|
||||||
self.abs_prec = float(absolute_precision or 0.0)
|
self.abs_prec = float(absolute_precision or 0.0)
|
||||||
self.rel_prec = float(relative_precision or 1.2e-7)
|
self.rel_prec = float(relative_precision or 1.2e-7)
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ class ScaledInteger(DataType):
|
|||||||
# store hints
|
# store hints
|
||||||
self.hints = {}
|
self.hints = {}
|
||||||
self.unit = unicode(unit)
|
self.unit = unicode(unit)
|
||||||
self.fmtstr = unicode(fmtstr or u'%f')
|
self.fmtstr = unicode(fmtstr or u'%g')
|
||||||
self.abs_prec = float(absolute_precision or self.scale)
|
self.abs_prec = float(absolute_precision or self.scale)
|
||||||
self.rel_prec = float(relative_precision or 0)
|
self.rel_prec = float(relative_precision or 0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user