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

Function test_ffill_limit

xarray/tests/test_missing.py:539–551  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

537
538@requires_bottleneck
539def test_ffill_limit():
540 da = xr.DataArray(
541 [0, np.nan, np.nan, np.nan, np.nan, 3, 4, 5, np.nan, 6, 7], dims="time"
542 )
543 result = da.ffill("time")
544 expected = xr.DataArray([0, 0, 0, 0, 0, 3, 4, 5, 5, 6, 7], dims="time")
545 assert_array_equal(result, expected)
546
547 result = da.ffill("time", limit=1)
548 expected = xr.DataArray(
549 [0, 0, np.nan, np.nan, np.nan, 3, 4, 5, 5, 6, 7], dims="time"
550 )
551 assert_array_equal(result, expected)
552
553
554def test_interpolate_dataset(ds):

Callers

nothing calls this directly

Calls 1

ffillMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…