nifty8.re.misc module#
- interpolate(xmin=-7.0, xmax=7.0, N=14000) Callable [source]#
Replaces a local nonlinearity such as jnp.exp with a linear interpolation
Interpolating functions speeds up code and increases numerical stability in some cases, but at a cost of precision and range.
- Parameters:
xmin (float) – Minimal interpolation value. Default: -7.
xmax (float) – Maximal interpolation value. Default: 7.
N (int) – Number of points used for the interpolation. Default: 14000
- is_iterable_of_non_iterables(ls: Any) bool [source]#
Indicates whether the input is one dimensional.
An object is considered one dimensional if it is an iterable of non-iterable items.