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) = targetforuin[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 >= y1and that the interpolant is decreasing on the interval.- Parameters:
target – The values to find.
h – As for
hermite_cubic().y0 – As for
hermite_cubic().y1 – As for
hermite_cubic().d0 – As for
hermite_cubic().d1 – As for
hermite_cubic().c0 – The second derivatives, for
hermite_quintic(); None for the cubic.c1 – The second derivatives, for
hermite_quintic(); None for the cubic.n_iter – The number of bisection steps (64 reaches machine precision in u).
- Returns:
u.- Return type:
ndarray