np.clip should be faster