From e9c1962f31a7b5fd7a98ee4c2adf2ac147aabbcf Mon Sep 17 00:00:00 2001 From: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:05:13 -0700 Subject: [PATCH] Fix pandas interpolate(fill_value=) error (#8139) --- xarray/tests/test_missing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xarray/tests/test_missing.py b/xarray/tests/test_missing.py index a6b6b1f80ce..c303659116b 100644 --- a/xarray/tests/test_missing.py +++ b/xarray/tests/test_missing.py @@ -104,7 +104,8 @@ def test_interpolate_pd_compat(): for dim in ["time", "x"]: actual = da.interpolate_na(method=method, dim=dim, fill_value=np.nan) expected = df.interpolate( - method=method, axis=da.get_axis_num(dim), fill_value=(np.nan, np.nan) + method=method, + axis=da.get_axis_num(dim), ) # Note, Pandas does some odd things with the left/right fill_value # for the linear methods. This next line inforces the xarray @@ -140,7 +141,8 @@ def test_interpolate_pd_compat_non_uniform_index(): method="linear", dim=dim, use_coordinate=True, fill_value=np.nan ) expected = df.interpolate( - method=method, axis=da.get_axis_num(dim), fill_value=np.nan + method=method, + axis=da.get_axis_num(dim), ) # Note, Pandas does some odd things with the left/right fill_value