# scipy.stats.trim1

scipy.stats.trim1(a, proportiontocut, tail='right', axis=0)

  Slice 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). Slice 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.

  Examples

      >>> from scipy import stats
      >>> a = np.arange(20)
      >>> b = stats.trim1(a, 0.5, 'left')
      >>> b
      array([10, 11, 12, 13, 14, 16, 15, 17, 18, 19])

scipy.stats.trimboth scipy.stats.zmap