bundles / scipy 1.17.1 / scipy / stats / _mstats_basic / trima
function
scipy.stats._mstats_basic:trima
Signature
def trima ( a , limits = None , inclusive = (True, True) ) Summary
Trims an array by masking the data outside some given limits.
Extended Summary
Returns a masked version of the input array.
Parameters
a: array_likeInput array.
limits: {None, tuple}, optionalTuple of (lower limit, upper limit) in absolute values. Values of the input array lower (greater) than the lower (upper) limit will be masked. A limit is None indicates an open interval.
inclusive: (bool, bool) tuple, optionalTuple of (lower flag, upper flag), indicating whether values exactly equal to the lower (upper) limit are allowed.
Examples
from scipy.stats.mstats import trima import numpy as np✓
a = np.arange(10)
✓trima(a, limits=(2, 8), inclusive=(True, False))
✓Aliases
-
scipy.stats._mstats_basic.trima