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

Method test_resample_skipna

xarray/tests/test_groupby.py:2075–2082  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2073 assert_identical(result, expected)
2074
2075 def test_resample_skipna(self) -> None:
2076 times = pd.date_range("2000-01-01", freq="6h", periods=10)
2077 array = DataArray(np.ones(10), [("time", times)])
2078 array[1] = np.nan
2079
2080 result = array.resample(time="1D").mean(skipna=False)
2081 expected = DataArray([np.nan, 1, 1], [("time", times[::4])])
2082 assert_identical(result, expected)
2083
2084 def test_upsample(self) -> None:
2085 times = pd.date_range("2000-01-01", freq="6h", periods=5)

Callers

nothing calls this directly

Calls 4

resampleMethod · 0.95
DataArrayClass · 0.90
assert_identicalFunction · 0.90
meanMethod · 0.45

Tested by

no test coverage detected