diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-03-12 07:51:46 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-03-12 07:51:46 +0100 |
commit | 304caa47e46028d679a8e8136b99706da9cd197c (patch) | |
tree | ed8a5d811bab5afd6824f22c87394226360f2619 /lib/loader | |
parent | 9c12acbdb537f20a333791eafa959bf31f4647ef (diff) |
handle floating-point parameter values
Diffstat (limited to 'lib/loader')
-rw-r--r-- | lib/loader/plain.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/loader/plain.py b/lib/loader/plain.py index 07a3be5..1818bce 100644 --- a/lib/loader/plain.py +++ b/lib/loader/plain.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from ..utils import soft_cast_int, soft_cast_float +from ..utils import soft_cast_int_or_float, soft_cast_float import os import re @@ -33,7 +33,7 @@ class CSVfile: else: param_values = list( map( - soft_cast_int, + soft_cast_int_or_float, map( lambda iv: iv[1], filter( @@ -82,7 +82,7 @@ class Logfile: return self.kv_to_param(kv_str, soft_cast_float) def kv_to_param_i(self, kv_str): - return self.kv_to_param(kv_str, soft_cast_int) + return self.kv_to_param(kv_str, soft_cast_int_or_float) def load(self, f): observations = list() |