Skip to content

Commit 9133af9

Browse files
authored
Merge pull request #54 from lucduron/fix-deprecation-warning
Fix DeprecationWarning
2 parents 6c99f28 + ac5fc09 commit 9133af9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/run_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- uses: "actions/setup-python@v2"
4242
with:
4343
python-version: "${{ matrix.python }}"
44-
- uses: "actions/cache@v2"
44+
- uses: "actions/cache@v3"
4545
id: "cache"
4646
with:
4747
path: "${{ env.pythonLocation }}"

xarray_selafin/xarray_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ def write_serafin(fout, ds):
162162
temp = np.empty(shape, dtype=slf_header.np_float_type)
163163
for iv, var in enumerate(slf_header.var_IDs):
164164
if slf_header.nb_frames == 1:
165-
temp[iv] = ds[var]
165+
temp[iv] = ds[var].values
166166
else:
167-
temp[iv] = ds.isel(time=it)[var]
167+
temp[iv] = ds.isel(time=it)[var].values
168168
if slf_header.nb_planes > 1:
169169
temp[iv] = np.reshape(np.ravel(temp[iv]), (slf_header.nb_planes, slf_header.nb_nodes_2d))
170170
resout.write_entire_frame(

0 commit comments

Comments
 (0)