### Navigation

- index
- modules |
- next |
- previous |
- SciPy v0.7 Reference Guide (DRAFT) »
- Statistical functions (`scipy.stats`) »

# scipy.stats.trimboth

`scipy.stats.``trimboth`(a, proportiontocut)

  Slices off the passed proportion of items from BOTH ends of the passed array (i.e., with proportiontocut=0.1, slices ‘leftmost’ 10% AND ‘rightmost’ 10% of scores. You must pre-sort the array if you want “proper” trimming. Slices off LESS if proportion results in a non-integer slice index (i.e., conservatively slices off proportiontocut).

  Returns: trimmed version of array a

### Navigation

- index
- modules |
- next |
- previous |
- SciPy v0.7 Reference Guide (DRAFT) »
- Statistical functions (`scipy.stats`) »