This is documentation for an old release of SciPy (version 0.10.0). Read this page in the documentation of the latest stable release (version 1.15.1).
Calculates the harmonic mean along the specified axis.
That is: n / (1/x1 + 1/x2 + ... + 1/xn)
Parameters : | a : array_like
axis : int, optional, default axis=0
dtype : dtype, optional
|
---|---|
Returns : | hmean : ndarray,
|
See also
Notes
The harmonic mean is computed over a single dimension of the input array, axis=0 by default, or all values in the array if axis=None. float64 intermediate and return values are used for integer inputs.
Use masked arrays to ignore any non-finite values in the input or that arise in the calculations such as Not a Number and infinity.