forward fill missing values
(arr, dim=None, limit=None)
| 438 | |
| 439 | |
| 440 | def ffill(arr, dim=None, limit=None): |
| 441 | """forward fill missing values""" |
| 442 | |
| 443 | axis = arr.get_axis_num(dim) |
| 444 | |
| 445 | # work around for bottleneck 178 |
| 446 | _limit = limit if limit is not None else arr.shape[axis] |
| 447 | |
| 448 | return apply_ufunc( |
| 449 | push, |
| 450 | arr, |
| 451 | dask="allowed", |
| 452 | keep_attrs=True, |
| 453 | output_dtypes=[arr.dtype], |
| 454 | kwargs=dict(n=_limit, axis=axis), |
| 455 | ).transpose(*arr.dims) |
| 456 | |
| 457 | |
| 458 | def bfill(arr, dim=None, limit=None): |
no test coverage detected
searching dependent graphs…