Clip array to a given value.
Similar to numpy.clip(), except that values less than threshmin or greater than threshmax are replaced by newval, instead of by threshmin and threshmax respectively.
Parameters : | a : ndarray
threshmin : {None, float}, optional
threshmax : {None, float}, optional
newval : {0, float}, optional
|
---|---|
Returns : | a, with values less (greater) than threshmin (threshmax) replaced with newval. : |