On this page Signature

API Reference / mespy.weighted_mean

weighted_mean

Signature

weighted_mean(x: ArrayLike, w: ArrayLike | None = None) -> float

weighted_mean computes the simple arithmetic mean or, if provided, the weighted mean with strictly positive weights.

Overview summarizes purpose, parameters, errors and a usage example; Implementation walks through the internal flow and the implemented formulas step by step.