derivkit.derivatives.finite.batch_eval module#

Batch evaluation utilities for finite-difference methods.

derivkit.derivatives.finite.batch_eval.eval_points(func: Callable[[Any], Any], xs: Sequence[Any], n_workers: int | None = None) ndarray#

Evaluates func at a sequence of points.

Parameters:
  • func – Callable taking a single argument (scalar or array-like).

  • xs – 1D sequence of points at which to evaluate func. Entries may be scalars or array-like objects (e.g. vectors/tensors).

  • n_workers – Number of parallel outer workers. If None or <=1, runs serially. If greater than the number of points, capped to that number.

Returns:

An array of function values at the specified points.