From 46484ce4beab490b9839f8e716902280be97df20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20D=C3=ADaz=20V=C3=A9lez?= Date: Sat, 19 Sep 2026 14:05:10 -0500 Subject: [PATCH] Set text encoding in call to np.genfromtxt Set encoding utf-8. Otherwise boost::python throws exception when the data table for GSF. --- src/simweights/_fluxes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simweights/_fluxes.py b/src/simweights/_fluxes.py index 85c84d1..4b1d358 100644 --- a/src/simweights/_fluxes.py +++ b/src/simweights/_fluxes.py @@ -415,7 +415,7 @@ class GlobalSplineFitBase(CosmicRayFlux): groups: Sequence[tuple[int, int]] def __init__(self: GlobalSplineFitBase) -> None: - data = genfromtxt(Path(__file__).parent / "gsf_data_table.txt") + data = genfromtxt(Path(__file__).parent / "gsf_data_table.txt", encoding="utf-8") energy = data.T[0] elements = data.T[1:] self._funcs = []