MCPcopy
hub / github.com/pydata/xarray / test_rolling

Method test_rolling

xarray/tests/test_sparse.py:766–773  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

764
765 @pytest.mark.xfail(reason="No implementation of np.pad")
766 def test_rolling(self):
767 a1 = self.ds_xr
768 a2 = self.sp_xr
769 m1 = a1.rolling(x=2, center=True).mean()
770 m2 = a2.rolling(x=2, center=True).mean()
771
772 assert isinstance(m2.data, sparse.SparseArray)
773 assert np.allclose(m1.data, m2.data.todense())
774
775 @pytest.mark.xfail(reason="Coercion to dense")
776 def test_rolling_exp(self):

Callers

nothing calls this directly

Calls 3

meanMethod · 0.45
rollingMethod · 0.45
todenseMethod · 0.45

Tested by

no test coverage detected