From bd5f360dd523080ef36affe1e8720746c014e45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davide=20Sandon=C3=A0?= Date: Tue, 29 Oct 2024 16:41:44 +0100 Subject: [PATCH] fix bug with replace --- pygasflow/nozzles/rao_parabola_angles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pygasflow/nozzles/rao_parabola_angles.py b/pygasflow/nozzles/rao_parabola_angles.py index df3a299..c18a2c4 100644 --- a/pygasflow/nozzles/rao_parabola_angles.py +++ b/pygasflow/nozzles/rao_parabola_angles.py @@ -67,7 +67,10 @@ def __init__(self): if os.path.isfile(os.path.join(data_dir, f))] # substitute "," with "." for decimal separator - func = lambda s: float(s.replace(b",", b".")) + def func(s): + if isinstance(s, str): + return float(s.replace(",", ".")) + return float(s.replace(b",", b".")) c = { 0: func, 1: func,