turicreate.SArray.clip_lower

SArray.clip_lower(threshold)

Create new SArray with all values clipped to the given lower bound. This function can operate on numeric arrays, as well as vector arrays, in which case each individual element in each vector is clipped. Throws an exception if the SArray is empty or the types are non-numeric.

Parameters:
threshold : float

The lower bound used to clip values.

Returns:
out : SArray

See also

clip, clip_upper

Examples

>>> sa = turicreate.SArray([1,2,3])
>>> sa.clip_lower(2)
dtype: int
Rows: 3
[2, 2, 3]