pyinterp.fill.matrix#
- pyinterp.fill.matrix(grid, fill_value=None)[source]#
Fill a 2D array by linear interpolation.
- Parameters:
grid (_FloatArrayT) – 2D array to fill
fill_value (float | None) – Value to use to determine missing values (if None, use NaN)
Note
This function modifies the grid in-place.
Examples
>>> import numpy as np >>> grid = np.arange(100, dtype=np.float32).reshape(10, 10) >>> grid[::2, ::2] = np.nan >>> matrix(grid)