Skip to content

Commit

Permalink
Merge pull request #174 from csiro-coasts/fix-xarray-timedelta-future…
Browse files Browse the repository at this point in the history
…-warning

Fix a FutureWarning from xarray around timedelta decoding
  • Loading branch information
mx-moth authored Feb 5, 2025
2 parents fbe02db + 8592c6d commit 82ad399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/masking/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_find_fill_value_timedelta_with_missing_value(
dataset_path, 'var',
numpy.array([[0, 1], [2, missing_value]], dtype=numpy.float32))

with xarray.open_dataset(dataset_path) as dataset:
with xarray.open_dataset(dataset_path, decode_timedelta=True) as dataset:
data_array = dataset['var']
assert dataset['var'].dtype == numpy.dtype('timedelta64[ns]')
fill_value = masking.find_fill_value(data_array)
Expand Down

0 comments on commit 82ad399

Please sign in to comment.