This is documentation for an old release of SciPy (version 0.9.0). Read this page in the documentation of the latest stable release (version 1.15.0).
Trims an array by masking the data outside some given limits. Returns a masked version of the input array.
Parameters : | a : sequence
limits : {None, tuple} optional
inclusive : {(True, True) tuple} optional
relative : {False, True} optional
axis : {None, integer}, optional
|
---|
Examples
>>>z = [ 1, 2, 3, 4, 5, 6, 7, 8, 9,10] >>>trim(z,(3,8)) [–,–, 3, 4, 5, 6, 7, 8,–,–] >>>trim(z,(0.1,0.2),relative=True) [–, 2, 3, 4, 5, 6, 7, 8,–,–]