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

Function arrays

xarray/tests/test_computation.py:1555–1568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1553
1554@pytest.fixture(scope="module")
1555def arrays():
1556 da = xr.DataArray(
1557 np.random.random((3, 21, 4)),
1558 coords={"time": pd.date_range("2000-01-01", freq="1D", periods=21)},
1559 dims=("a", "time", "x"),
1560 )
1561
1562 return [
1563 da.isel(time=range(18)),
1564 da.isel(time=range(2, 20)).rolling(time=3, center=True).mean(),
1565 xr.DataArray([[1, 2], [1, np.nan]], dims=["x", "time"]),
1566 xr.DataArray([[1, 2], [np.nan, np.nan]], dims=["x", "time"]),
1567 xr.DataArray([[1, 2], [2, 1]], dims=["x", "time"]),
1568 ]
1569
1570
1571@pytest.fixture(scope="module")

Callers

nothing calls this directly

Calls 3

iselMethod · 0.95
meanMethod · 0.45
rollingMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…