一时间忘了,就又看了一下API。是这样说的
numpy. clip ( a, a_min, a_max, out=None ) [source]Clip (limit) the values in an array.
Given an interval, values outside the interval are clipped to the interval edges. For example, if an interval of [0, 1] is specified, values smaller than 0 become 0, and values larger than 1 become 1.
也就是说,截取的意思,超出的部分就把它强置为边界部分。