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

Function test_interpolate_na_max_gap_time_specifier

xarray/tests/test_missing.py:691–699  ·  view source on GitHub ↗
(da_time, max_gap, transform, use_cftime)

Source from the content-addressed store, hash-verified

689 "max_gap", ["3h", np.timedelta64(3, "h"), pd.to_timedelta("3h")]
690)
691def test_interpolate_na_max_gap_time_specifier(da_time, max_gap, transform, use_cftime):
692 da_time["t"] = xr.date_range(
693 "2001-01-01", freq="h", periods=11, use_cftime=use_cftime
694 )
695 expected = transform(
696 da_time.copy(data=[np.nan, 1, 2, 3, 4, 5, np.nan, np.nan, np.nan, np.nan, 10])
697 )
698 actual = transform(da_time).interpolate_na("t", max_gap=max_gap)
699 assert_allclose(actual, expected)
700
701
702@requires_bottleneck

Callers

nothing calls this directly

Calls 3

assert_allcloseFunction · 0.90
copyMethod · 0.45
interpolate_naMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…