MCPcopy Index your code
hub / github.com/pydata/xarray / test_interpolate_pd_compat_polynomial

Function test_interpolate_pd_compat_polynomial

xarray/tests/test_missing.py:185–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

183
184@requires_scipy
185def test_interpolate_pd_compat_polynomial():
186 shapes = [(8, 8), (1, 20), (20, 1), (100, 100)]
187 frac_nans = [0, 0.5, 1]
188 orders = [1, 2, 3]
189
190 for shape, frac_nan, order in itertools.product(shapes, frac_nans, orders):
191 da, df = make_interpolate_example_data(shape, frac_nan)
192
193 for dim in ["time", "x"]:
194 actual = da.interpolate_na(
195 method="polynomial", order=order, dim=dim, use_coordinate=False
196 )
197 expected = df.interpolate(
198 method="polynomial", order=order, axis=da.get_axis_num(dim)
199 )
200 np.testing.assert_allclose(actual.values, expected.values)
201
202
203@requires_scipy

Callers

nothing calls this directly

Calls 4

interpolateMethod · 0.80
interpolate_naMethod · 0.45
get_axis_numMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…