function finite_difference_coefficients¶
- deeptime.util.diff.finite_difference_coefficients(x_bar, xs, k=1)¶
Calculates finite difference coefficients. The coefficients are computed so that
\[f^{(k)}(\bar{x}) \approx f(x) * \mathrm{fd\_coeff}(x, \mathrm{window\_around}(\bar{x}), k). \]It is required that len(x) > k.
See here for details.
- Parameters:
- Returns:
weights – An array w with weights so that the dot product \(w \cdot f(\mathrm{xs}) \approx f^{(k)}(\bar{x})\) is approximately the function’s k-th derivative at \(\bar{x}\).
- Return type:
ndarray