I have a two-dimensional numpy array(uint16), how can I truncate all values above a certain barrier(say 255) to that barrier? The other values must stay the same. Using a nested loop seems to be ineffecient and clumsy.
I have a two-dimensional numpy array(uint16), how can I truncate all values above a
Share
the output will be