scipy.stats.trim1¶
-
scipy.stats.
trim1
(a, proportiontocut, tail='right', axis=0)[source]¶ Slices off a proportion from ONE end of the passed array distribution.
If proportiontocut = 0.1, slices off ‘leftmost’ or ‘rightmost’ 10% of scores. The lowest or highest values are trimmed (depending on the tail). Slices off less if proportion results in a non-integer slice index (i.e., conservatively slices off proportiontocut ).
Parameters: - a : array_like
Input array
- proportiontocut : float
Fraction to cut off of ‘left’ or ‘right’ of distribution
- tail : {‘left’, ‘right’}, optional
Defaults to ‘right’.
- axis : int or None, optional
Axis along which to trim data. Default is 0. If None, compute over the whole array a.
Returns: - trim1 : ndarray
Trimmed version of array a. The order of the trimmed content is undefined.