The NumPy clip() function will clip, or limit, the values in an array. This allows you to set a lower and/or upper limit on the array. Any value outside of the interval are clipped to the interval edges.