bundles / scipy 1.17.1 / scipy / optimize / _numdiff / _compute_absolute_step
function
scipy.optimize._numdiff:_compute_absolute_step
source: /scipy/optimize/_numdiff.py :147
Signature
def _compute_absolute_step ( rel_step , x0 , f0 , method ) Summary
Computes an absolute step from a relative step for finite difference calculation.
Parameters
rel_step: None or array-likeRelative step for the finite difference calculation
x0: np.ndarrayParameter vector
f0: np.ndarray or scalarmethod: {'2-point', '3-point', 'cs'}
Returns
h: floatThe absolute step size
Notes
h will always be np.float64. However, if x0 or f0 are smaller floating point dtypes (e.g. np.float32), then the absolute step size will be calculated from the smallest floating point size.
Aliases
-
scipy.optimize._numdiff._compute_absolute_step