diff --git a/galvani/BioLogic.py b/galvani/BioLogic.py index be2996f..3191c07 100644 --- a/galvani/BioLogic.py +++ b/galvani/BioLogic.py @@ -17,10 +17,8 @@ import numpy as np if sys.version_info.major <= 2: str3 = str - from string import maketrans else: str3 = functools.partial(str, encoding='ascii') - maketrans = bytes.maketrans def fieldname_to_dtype(fieldname): @@ -49,10 +47,10 @@ def fieldname_to_dtype(fieldname): raise ValueError("Invalid column header: %s" % fieldname) -def comma_converter(float_string): - """Convert numbers to floats whether the decimal point is '.' or ','""" - trans_table = maketrans(b',', b'.') - return float(float_string.translate(trans_table)) +def comma_converter(float_text): + """Convert text to float whether the decimal point is '.' or ','""" + trans_table = bytes.maketrans(b',', b'.') + return float(float_text.translate(trans_table)) def MPTfile(file_or_path):