Is there a function to clip an array to a maximum value? e.g. set values in an arr

I wonder why we kept the clamp! function, given that it seems equivalent to

array .= clamp.(array, lo, hi)

Probably it was just an oversight that it didn’t get removed when we removed the other vectorized functions in favor of dot calls?

2 Likes