relative_step#
- scarlet2.relative_step(x, *args, factor=0.01, minimum=1e-06)[source]#
Step size set at factor times the norm of x
This step size is useful for Parameter instances whose uncertainty is relative, not absolute, e.g. for
ArraySpectrum.- Parameters:
x (
array) – Array to compute step size for*args (
list) – Additional argumentsfactor (
float) – Scale norm by this numberminimum (
float) – Minimum return value to prevent zero step sizes
- Returns:
factor*norm(x), or minimum, whichever is larger.
- Return type:
float