From 0181b22ef256ece318bc16ef6e54aa942943da89 Mon Sep 17 00:00:00 2001 From: Luc DURON Date: Wed, 28 May 2025 16:45:59 +0200 Subject: [PATCH 1/2] Fix DeprecationWarning xarray_selafin\xarray_backend.py:166: DeprecationWarning: __array__ implementation doesn't accept a copy keyword, so passing copy=False failed. __array__ must implement 'dtype' and 'copy' keyword arguments. temp[iv] = ds.isel(time=it)[var] --- xarray_selafin/xarray_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xarray_selafin/xarray_backend.py b/xarray_selafin/xarray_backend.py index 41beaea..d85f803 100644 --- a/xarray_selafin/xarray_backend.py +++ b/xarray_selafin/xarray_backend.py @@ -162,9 +162,9 @@ def write_serafin(fout, ds): temp = np.empty(shape, dtype=slf_header.np_float_type) for iv, var in enumerate(slf_header.var_IDs): if slf_header.nb_frames == 1: - temp[iv] = ds[var] + temp[iv] = ds[var].values else: - temp[iv] = ds.isel(time=it)[var] + temp[iv] = ds.isel(time=it)[var].values if slf_header.nb_planes > 1: temp[iv] = np.reshape(np.ravel(temp[iv]), (slf_header.nb_planes, slf_header.nb_nodes_2d)) resout.write_entire_frame( From ac5fc09f5d276631e702aa4a60df4c2756837836 Mon Sep 17 00:00:00 2001 From: Luc DURON Date: Wed, 28 May 2025 16:47:54 +0200 Subject: [PATCH 2/2] FIx tests (use actions/cache@v3) --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 0cb6ca2..cc80ce8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -41,7 +41,7 @@ jobs: - uses: "actions/setup-python@v2" with: python-version: "${{ matrix.python }}" - - uses: "actions/cache@v2" + - uses: "actions/cache@v3" id: "cache" with: path: "${{ env.pythonLocation }}"