kde_cpi.math.utils module¶
Common helper functions for statistical routines.
- kde_cpi.math.utils.normalize_weights(weights, *, ensure_positive=True)[source]¶
Normalize weights so they sum to one and validate positivity.
- kde_cpi.math.utils.sort_by_values(values, weights)[source]¶
Return values and weights sorted together by ascending values.