hmf.core._kernels.interpolation.invert_hermite

hmf.core._kernels.interpolation.invert_hermite(target: ndarray[tuple[Any, ...], dtype[float64]], h: float, y0: ndarray[tuple[Any, ...], dtype[float64]], y1: ndarray[tuple[Any, ...], dtype[float64]], d0: ndarray[tuple[Any, ...], dtype[float64]], d1: ndarray[tuple[Any, ...], dtype[float64]], c0: ndarray[tuple[Any, ...], dtype[float64]] | None = None, c1: ndarray[tuple[Any, ...], dtype[float64]] | None = None, n_iter: int = 64) → ndarray[tuple[Any, ...], dtype[float64]][source]

Solve hermite(u) = target for u in [0, 1], for a decreasing interpolant.

Uses bisection with a fixed number of steps, so the result is deterministic and elementwise. The caller guarantees y0 >= target >= y1 and that the interpolant is decreasing on the interval.

Parameters:
Returns:

u.

Return type:

ndarray