I have a numpy array and I want to force every element that is less than zero to be zero and every element above 255 will be forced down to 255.
eg. x = (-1,7,255,299) => (0,7,255,255)
Is there a not too complicated one-liner that can accomplish this?