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

Function test_datetime_single_string

xarray/tests/test_interp.py:738–747  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

736
737@requires_scipy
738def test_datetime_single_string() -> None:
739 da = xr.DataArray(
740 np.arange(24),
741 dims="time",
742 coords={"time": pd.date_range("2000-01-01", periods=24, unit="ns")},
743 )
744 actual = da.interp(time="2000-01-01T12:00")
745 expected = xr.DataArray(0.5)
746
747 assert_allclose(actual.drop_vars("time"), expected)
748
749
750@requires_cftime

Callers

nothing calls this directly

Calls 4

interpMethod · 0.95
assert_allcloseFunction · 0.90
arangeMethod · 0.80
drop_varsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…