derivkit.local_polynomial_derivative.sampling module¶
Sampling utilities for local polynomial derivative estimation.
- derivkit.local_polynomial_derivative.sampling.build_samples(func: Callable[[float], Any], x0: float, config: LocalPolyConfig, n_workers: int = 1)¶
Builds sample points for a function around a central value.
- Parameters:
func – Function to evaluate. Takes a float and returns a scalar or np.ndarray.
x0 – Point around which to sample.
config – LocalPolyConfig instance with sampling settings.
n_workers – Number of parallel workers for function evaluation.
- Returns:
An array of sample points (shape (n_samples,)). ys: An array of function evaluations (shape (n_samples, n_components)).
- Return type:
xs
- Raises:
ValueError – if rel_steps in config is not a 1D non-empty sequence of floats.