pyinterp.fill.loess#
- pyinterp.fill.loess(mesh: Grid4D, nx: int = 3, ny: int = 3, value_type: str | None = None, num_threads: int = 0) NDArray4D[source]#
- pyinterp.fill.loess(mesh: Grid3D, nx: int = 3, ny: int = 3, value_type: str | None = None, num_threads: int = 0) NDArray3D
- pyinterp.fill.loess(mesh: Grid2D, nx: int = 3, ny: int = 3, value_type: str | None = None, num_threads: int = 0) NDArray2D
Filter values using a locally weighted regression function (LOESS).
Apply LOESS filtering to fill or smooth grid values using the tri-cube weight function: \(w(x)=(1-|d|^3)^3\).
- Parameters:
mesh – Grid function on a uniform 2-dimensional grid to be filled.
nx – Number of points of the half-window to be taken into account along the X-axis. Defaults to
3.ny – Number of points of the half-window to be taken into account along the Y-axis. Defaults to
3.value_type – Type of values processed by the filter. Supported are
undefined,defined,all. Default toundefined.num_threads – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to
0.
- Returns:
The grid will have NaN filled with extrapolated values.