()
| 537 | |
| 538 | @requires_bottleneck |
| 539 | def 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 | |
| 554 | def test_interpolate_dataset(ds): |
nothing calls this directly
no test coverage detected
searching dependent graphs…