(method)
| 469 | @requires_dask |
| 470 | @pytest.mark.parametrize("method", ["ffill", "bfill"]) |
| 471 | def test_ffill_bfill_dask(method): |
| 472 | da, _ = make_interpolate_example_data((40, 40), 0.5) |
| 473 | da = da.chunk({"x": 5}) |
| 474 | |
| 475 | dask_method = getattr(da, method) |
| 476 | numpy_method = getattr(da.compute(), method) |
| 477 | # unchunked axis |
| 478 | with raise_if_dask_computes(): |
| 479 | actual = dask_method("time") |
| 480 | expected = numpy_method("time") |
| 481 | assert_equal(actual, expected) |
| 482 | |
| 483 | # chunked axis |
| 484 | with raise_if_dask_computes(): |
| 485 | actual = dask_method("x") |
| 486 | expected = numpy_method("x") |
| 487 | assert_equal(actual, expected) |
| 488 | |
| 489 | # with limit |
| 490 | with raise_if_dask_computes(): |
| 491 | actual = dask_method("time", limit=3) |
| 492 | expected = numpy_method("time", limit=3) |
| 493 | assert_equal(actual, expected) |
| 494 | |
| 495 | # limit < axis size |
| 496 | with raise_if_dask_computes(): |
| 497 | actual = dask_method("x", limit=2) |
| 498 | expected = numpy_method("x", limit=2) |
| 499 | assert_equal(actual, expected) |
| 500 | |
| 501 | # limit > axis size |
| 502 | with raise_if_dask_computes(): |
| 503 | actual = dask_method("x", limit=41) |
| 504 | expected = numpy_method("x", limit=41) |
| 505 | assert_equal(actual, expected) |
| 506 | |
| 507 | |
| 508 | @requires_bottleneck |
nothing calls this directly
no test coverage detected
searching dependent graphs…