3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 20:34:38 +01:00

[py3] properly cast strings to float

This commit is contained in:
Nils Wentzell 2020-04-08 15:57:21 -04:00
parent 392c94d4c3
commit e2a1534272

View File

@ -51,7 +51,7 @@ class ConverterTools:
for old, new in to_replace.items(): for old, new in to_replace.items():
line = line.replace(old, new) line = line.replace(old, new)
for x in line.split(): for x in line.split():
yield string.atof(x) yield float(x)
def repack(self): def repack(self):
""" """