simpeg.regularization.BaseRegularization.test#
- BaseRegularization.test(x=None, num=4, random_seed=None, **kwargs)[source]#
Run a convergence test on both the first and second derivatives.
They should be second order!
- Parameters:
- x
Noneor(n_param, )numpy.ndarray,optional The evaluation point for the Taylor expansion.
- num
int The number of iterations in the convergence test.
- random_seed
RandomSeedorNone,optional Random seed used for generating a random array for
xif it’s None, and thevarray for testing the second derivatives. It can either be an int, a predefined Numpy random number generator, or any valid input tonumpy.random.default_rng.
- x
- Returns:
- bool
Trueif both tests pass.Falseif either test fails.