Skip to content

Commit 147047e

Browse files
authored
Merge pull request #877 from vloncar/fix_precision_fmt
Fix weight precision format string
2 parents e4e926e + 9bd8364 commit 147047e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hls4ml/model/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def update_precision(self, new_precision):
564564
# to right of decimal point
565565
lsb = 2**-new_precision.fractional
566566
decimal_spaces = len(str(lsb).split('.')[1])
567-
self.precision_fmt = f'{{:{decimal_spaces}f}}'
567+
self.precision_fmt = f'{{:.{decimal_spaces}f}}'
568568
else:
569569
self.precision_fmt = '{:.0f}'
570570
else:

0 commit comments

Comments
 (0)