skued.triml
- skued.triml(array, percentile, axis=None, fill_value=0)
Trim values in an array that fall below (i.e. to the left) a certain percentile.
- Parameters:
array (~numpy.ndarray) – Array to be trimmed, typically an image.
percentile (float in range [0, 100]) – Percentile below which array elements are set to
fill_value
.axis (int or None, optional) – Axis along which to trim data. If None (default), compute over the whole array.
fill_value (float, optional) – Trimmed array elements are replaced with this value.
- Returns:
trimmed – Trimmed array of the same shape as
array
.- Return type:
~numpy.ndarray
See also
trimr
trim values in percentiles above a specific percentile.