5.1.4.1. numdifftools.limits.CStepGenerator¶
-
class
CStepGenerator
(base_step=None, step_ratio=4.0, num_steps=None, step_nom=None, offset=0, scale=1.2, use_exact_steps=True, path='radial', dtheta=0.39269908169872414, **kwds)[source]¶ Generates a sequence of steps
- where
- steps = base_step * step_nom *
- (exp(1j*dtheta) * step_ratio) ** (i + offset)
for i = 0, 1, …, num_steps-1
Parameters: - base_step : float, array-like, default None
Defines the minimum step, if None, the value is set to EPS**(1/scale)
- step_ratio : real scalar, optional, default 4.0
Ratio between sequential steps generated.
- num_steps : scalar integer, optional,
defines number of steps generated. If None the value is 2 * int(round(16.0/log(abs(step_ratio)))) + 1
- step_nom : default maximum(log(1+|x|), 1)
Nominal step where x is supplied at runtime through the __call__ method.
- offset : real scalar, optional, default 0
offset to the base step
- use_exact_steps : boolean
If true make sure exact steps are generated
- scale : real scalar, default 1.2
scale used in base step.
- path : ‘spiral’ or ‘radial’
Specifies the type of path to take the limit along.
- dtheta: real scalar
If the path is spiral it will follow an exponential spiral into the limit, with angular steps at dtheta radians.
-
__init__
(base_step=None, step_ratio=4.0, num_steps=None, step_nom=None, offset=0, scale=1.2, use_exact_steps=True, path='radial', dtheta=0.39269908169872414, **kwds)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([base_step, step_ratio, num_steps, …])Initialize self. step_generator_function
(x[, method, n, order])Attributes
base_step
dtheta
min_num_steps
num_steps
scale
step_nom
step_ratio