Skip to content

Commit

Permalink
fix bug with replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide-sd committed Oct 29, 2024
1 parent 54f048e commit bd5f360
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pygasflow/nozzles/rao_parabola_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit bd5f360

Please sign in to comment.