Skip to content

Commit

Permalink
models: Explicitly set Z&P 2008 data file encoding
Browse files Browse the repository at this point in the history
Fixes some corner cases where the utf-8 format of the Zhang and Paxton
2008 coefficient data file is not correctly detected and
`numpy.genfromtxt()` fails on the unicode characters.

Increases the `numpy` minimum version since the `encoding` keyword was
introduced in version 1.14.0.
  • Loading branch information
st-bender committed Jan 8, 2024
1 parent 19bc242 commit 34c7a81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def find_meta(meta, *path):
},
include_package_data=True,
install_requires=[
"numpy>=1.13.0",
"numpy>=1.14.0",
"scipy>=0.9", # LinearNDInterpolator
],
extras_require=extras_require,
Expand Down
1 change: 1 addition & 0 deletions src/eppaurora/models/zhangpaxton2008.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def read_zp2008_coeffs(file=None, nf=6, nKp=len(KP_BINC)):
file or COEFF_PATH,
delimiter=" ",
dtype=None,
encoding="utf-8",
names=["name"] + COEFF_NAMES,
)
# number of coefficients per Kp bin
Expand Down

0 comments on commit 34c7a81

Please sign in to comment.