Skip to content

Commit

Permalink
Merge pull request #142 from joshua-hampton/fix-tests-numpy2
Browse files Browse the repository at this point in the history
Change conversion of flag values to list in error message
  • Loading branch information
joshua-hampton authored Jul 11, 2024
2 parents 28aff87 + efd7129 commit aba1f46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
exclude:
- os: macos-latest
python-version: '3.8'
- os: windows-latest
python-version: '3.8'
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion src/ncas_amof_netcdf_template/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def update_variable(ncfile, ncfile_varname, data, qc_data_error=True):
and "flag_values" in ncfile.variables[ncfile_varname].ncattrs()
):
if not np.in1d(data, ncfile.variables[ncfile_varname].flag_values).all():
valid_values = list(ncfile.variables[ncfile_varname].flag_values)
valid_values = ncfile.variables[ncfile_varname].flag_values.tolist()
msg = (
"Invalid data being added to QC variable, "
f"only {valid_values} are allowed."
Expand Down

0 comments on commit aba1f46

Please sign in to comment.