From 3294b0e3fe33330d68b7b710d26e1d65a4154a53 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:59:44 -0400 Subject: [PATCH] address warnings --- ravenpy/extractors/routing_product.py | 2 +- tests/test_bias_correction.py | 2 +- tests/test_graphs.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ravenpy/extractors/routing_product.py b/ravenpy/extractors/routing_product.py index 5090e123..20507a81 100644 --- a/ravenpy/extractors/routing_product.py +++ b/ravenpy/extractors/routing_product.py @@ -859,7 +859,7 @@ def upstream_from_coords( # Find the outlet sub-basin ID out_sb = find_geometry_from_coord(lon, lat, df) - out_sb_id = int(out_sb["SubId"]) + out_sb_id = int(out_sb["SubId"].iloc[0]) # Find upstream sub-basins up_ids = upstream_from_id(out_sb_id, df) diff --git a/tests/test_bias_correction.py b/tests/test_bias_correction.py index 1e715186..801adbce 100644 --- a/tests/test_bias_correction.py +++ b/tests/test_bias_correction.py @@ -1,6 +1,6 @@ import xarray as xr import xclim.sdba as sdba -from xclim.core.calendar import convert_calendar +from xarray.coding.calendar_ops import convert_calendar class TestBiasCorrect: diff --git a/tests/test_graphs.py b/tests/test_graphs.py index 8be6c47a..aa9186dd 100644 --- a/tests/test_graphs.py +++ b/tests/test_graphs.py @@ -18,7 +18,7 @@ def test_ts_fit_graph(self, get_local_testdata, tmp_path): copyfile(raven_hydrograph, file) with xr.open_dataset(file) as ds: - ts = stats(ds.q_sim, op="max", freq="M") + ts = stats(ds.q_sim, op="max", freq="ME") with set_options(check_missing="skip"): p = fit(ts) np.testing.assert_array_equal(p.isnull(), False)