pyinterp.core.fill.gauss_seidel_float64¶
- pyinterp.core.fill.gauss_seidel_float64(grid: numpy.ndarray[numpy.float64[m, n], flags.writeable], first_guess: pyinterp.core.fill.FirstGuess = <FirstGuess.ZonalAverage: 1>, is_circle: bool = True, max_iterations: int = 2000, epsilon: float = 0.0001, relaxation: float = 1.0, num_threads: int = 0) tuple[int, float] ¶
Replaces all undefined values (NaN) in a grid using the Gauss-Seidel method by relaxation.
- Parameters:
grid – Grid function on a uniform 2-dimensional grid to be filled.
is_circle – True if the X axis of the grid defines a circle. Defaults to
True
.max_iterations – Maximum number of iterations to be used by relaxation. Defaults to
2000
.epsilon – Tolerance for ending relaxation before the maximum number of iterations limit. Defaults to
1e-4
.relaxation – Relaxation constant. Defaults to
1
.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 number of iterations performed and the maximum residual value.