turicreate.SArray.clip_upper¶
-
SArray.
clip_upper
(threshold)¶ Create new SArray with all values clipped to the given upper bound. This function can operate on numeric arrays, as well as vector arrays, in which case each individual element in each vector is clipped.
Parameters: - threshold : float
The upper bound used to clip values.
Returns: - out : SArray
See also
Examples
>>> sa = turicreate.SArray([1,2,3]) >>> sa.clip_upper(2) dtype: int Rows: 3 [1, 2, 2]