#NEWLINE# def trimboth( data , proportiontocut = 0.2 , inclusive = ( True , True ) , axis = None ) : #NEWLINE# #INDENT# '\n    Trims the smallest and largest data values.\n\n    Trims the `data` by masking the ``int(proportiontocut * n)`` smallest and\n    ``int(proportiontocut * n)`` largest values of data along the given axis,\n    where n is the number of unmasked values before trimming.\n\n    Parameters\n    ----------\n    data : ndarray\n        Data to trim.\n    proportiontocut : float, optional\n        Percentage of trimming (as a float between 0 and 1).\n        If n is the number of unmasked values before trimming, the number of\n        values after trimming is ``(1 - 2*proportiontocut) * n``.\n        Default is 0.2.\n    inclusive : {(bool, bool) tuple}, optional\n        Tuple indicating whether the number of data being masked on each side\n        should be rounded (True) or truncated (False).\n    axis : int, optional\n        Axis along which to perform the trimming.\n        If None, the input array is first flattened.\n\n    ' #NEWLINE# return trimr ( data , limits = ( proportiontocut , proportiontocut ) , inclusive = inclusive , axis = axis )