Use utf-8 encoding when reading dose coefficient files (thanks Fabricio Gatti)

This commit is contained in:
Paul Romano 2022-06-08 06:37:07 -05:00
parent fe230168fb
commit e0d82e4878

View file

@ -23,7 +23,7 @@ def _load_dose_icrp116():
"""Load effective dose tables from text files"""
for particle, filename in _FILES:
path = Path(__file__).parent / filename
data = np.loadtxt(path, skiprows=3)
data = np.loadtxt(path, skiprows=3, encoding='utf-8')
data[:, 0] *= 1e6 # Change energies to eV
_DOSE_ICRP116[particle] = data